From 7e6c2eaf00a354dc3897236c75332e5ec4758e38 Mon Sep 17 00:00:00 2001 From: Marco Casaroli Date: Thu, 8 Oct 2026 12:20:07 +0200 Subject: [PATCH] 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 --- 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() * ****************************************************************************/