[PATCH v2 03/18] coda: don't take rcu_read_lock() in coda_flag_children()
NeilBrown <[email protected]>
| Newsgroups | gmane.linux.nfs,gmane.linux.kernel.autofs,gmane.linux.kernel,gmane.comp.file-systems.ceph.devel,gmane.comp.file-systems.coda.general,gmane.linux.file-systems |
|---|---|
| Message-ID | <[email protected]> |
From: NeilBrown <neil-+NVA1uvv1dVBDLzU/[email protected]> 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-+NVA1uvv1dVBDLzU/[email protected]> --- 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