[PATCH v3 03/11] coda: don't take rcu_read_lock() in coda_flag_children()

From: NeilBrown

Date: Tue Aug 25 2026 - 18:24:40 EST


From: NeilBrown <neil@xxxxxxxxxx>

As described in Documentation/RCU/whatisRCU.rst sections on
rcu_read_lock() and rcu_read_unlock(), spinlocks prevent the RCU grace
period from ending so there is no need to call rcu_read_lock/unlock
inside a spinlock protected section of code.

Signed-off-by: NeilBrown <neil@xxxxxxxxxx>
---
fs/coda/cache.c | 2 --
1 file changed, 2 deletions(-)

diff --git a/fs/coda/cache.c b/fs/coda/cache.c
index 245131296300..970f0022ec52 100644
--- a/fs/coda/cache.c
+++ b/fs/coda/cache.c
@@ -93,14 +93,12 @@ static void coda_flag_children(struct dentry *parent, int flag)
struct dentry *de;

spin_lock(&parent->d_lock);
- rcu_read_lock();
hlist_for_each_entry(de, &parent->d_children, d_sib) {
struct inode *inode = d_inode_rcu(de);
/* don't know what to do with negative dentries */
if (inode)
coda_flag_inode(inode, flag);
}
- rcu_read_unlock();
spin_unlock(&parent->d_lock);
}

--
2.50.0.107.gf914562f5916.dirty