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

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

commit 7e6c2eaf00a354dc3897236c75332e5ec4758e38
Author: Marco Casaroli <[email protected]>
AuthorDate: Thu Oct 8 12:20:07 2026 +0200

    fs/inode: Name the inode tree lock in the comments, not g_inode_sem.
    
    Three comments say that the caller of inode_search() and
    _inode_linktarget() holds the g_inode_sem semaphore.  That semaphore no
    longer exists.  The caller holds the inode tree lock, from inode_lock()
    or inode_rlock().  No code change.
    
    Assisted-by: Claude Code:claude-opus-5-5
    Signed-off-by: Marco Casaroli <[email protected]>
---
 fs/inode/fs_inodesearch.c | 4 ++--
 fs/inode/inode.h          | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/fs/inode/fs_inodesearch.c b/fs/inode/fs_inodesearch.c
index 7862c21e15a..c6e214ffe75 100644
--- a/fs/inode/fs_inodesearch.c
+++ b/fs/inode/fs_inodesearch.c
@@ -150,7 +150,7 @@ static int _inode_compare(FAR const char *fname, FAR struct 
inode *inode)
  *   the soft link.
  *
  * Assumptions:
- *   The caller holds the g_inode_sem semaphore
+ *   The caller holds the inode tree lock (inode_lock() or inode_rlock())
  *
  ****************************************************************************/
 
@@ -577,7 +577,7 @@ int inode_search_setup(FAR struct inode_search_s *desc,
  *   that link WILL be deferenced unconditionally.
  *
  * Assumptions:
- *   The caller holds the g_inode_sem semaphore
+ *   The caller holds the inode tree lock (inode_lock() or inode_rlock())
  *   The descriptor was initialized with inode_search_setup()
  *
  ****************************************************************************/
diff --git a/fs/inode/inode.h b/fs/inode/inode.h
index eb015c7afb4..f80695a1898 100644
--- a/fs/inode/inode.h
+++ b/fs/inode/inode.h
@@ -221,7 +221,7 @@ void inode_runlock(void);
  *           cares about existence (e.g. inode_reserve).
  *
  * Assumptions:
- *   The caller holds the g_inode_sem semaphore
+ *   The caller holds the inode tree lock (inode_lock() or inode_rlock())
  *   The descriptor was initialized with inode_search_setup()
  *
  ****************************************************************************/

Reply via email to