This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 9ca5c1d9c672a51b7706ecbcc2952d361b763b5a
Author: dongjiuzhu1 <dongjiuz...@xiaomi.com>
AuthorDate: Sat Jun 7 14:07:05 2025 +0800

    fs/file: unify prefix f_ for member locked
    
    update locked to f_locked
    
    Signed-off-by: dongjiuzhu1 <dongjiuz...@xiaomi.com>
---
 fs/vfs/fs_lock.c                    | 6 +++---
 include/nuttx/fs/fs.h               | 2 +-
 tools/pynuttx/nxgdb/protocols/fs.py | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/fs/vfs/fs_lock.c b/fs/vfs/fs_lock.c
index cf806da1ff..7b673f9874 100644
--- a/fs/vfs/fs_lock.c
+++ b/fs/vfs/fs_lock.c
@@ -732,7 +732,7 @@ retry:
 
   /* Update filep lock state */
 
-  filep->locked = true;
+  filep->f_locked = true;
 
   /* When there is a lock change, we need to wake up the blocking lock */
 
@@ -770,7 +770,7 @@ void file_closelk(FAR struct file *filep)
   bool deleted = false;
   int ret;
 
-  if (!filep->locked)
+  if (!filep->f_locked)
     {
       return;
     }
@@ -807,7 +807,7 @@ void file_closelk(FAR struct file *filep)
         {
           deleted = true;
           file_lock_delete(file_lock);
-          filep->locked = false;
+          filep->f_locked = false;
         }
     }
 
diff --git a/include/nuttx/fs/fs.h b/include/nuttx/fs/fs.h
index 3be9f34224..4d4d45d0bf 100644
--- a/include/nuttx/fs/fs.h
+++ b/include/nuttx/fs/fs.h
@@ -477,7 +477,7 @@ struct file
 #endif
 
 #if CONFIG_FS_LOCK_BUCKET_SIZE > 0
-  bool              locked; /* Filelock state: false - unlocked, true - locked 
*/
+  bool              f_locked; /* Filelock state: false - unlocked, true - 
locked */
 #endif
 };
 
diff --git a/tools/pynuttx/nxgdb/protocols/fs.py 
b/tools/pynuttx/nxgdb/protocols/fs.py
index b36d6c554f..2771eba71e 100644
--- a/tools/pynuttx/nxgdb/protocols/fs.py
+++ b/tools/pynuttx/nxgdb/protocols/fs.py
@@ -34,7 +34,7 @@ class File(Value):
     f_tag_fdsan: Value
     f_tag_fdcheck: Value
     f_backtrace: Value
-    locked: Value
+    f_locked: Value
 
 
 class Inode(Value):

Reply via email to