From: Madhuparna Bhowmik Date: Thu, 13 Feb 2020 15:03:59 +0000 (+0530) Subject: fs: nfsd: fileache.c: Use built-in RCU list checking X-Git-Tag: v5.7-rc1~89^2~33 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=057a2274357786c637093866c6668d5ff048436f;p=linux.git fs: nfsd: fileache.c: Use built-in RCU list checking list_for_each_entry_rcu() has built-in RCU and lock checking. Pass cond argument to list_for_each_entry_rcu() to silence false lockdep warning when CONFIG_PROVE_RCU_LIST is enabled by default. Signed-off-by: Madhuparna Bhowmik Signed-off-by: J. Bruce Fields Signed-off-by: Chuck Lever --- diff --git a/fs/nfsd/filecache.c b/fs/nfsd/filecache.c index 22e77ede9f14..82198d747c4c 100644 --- a/fs/nfsd/filecache.c +++ b/fs/nfsd/filecache.c @@ -890,7 +890,7 @@ nfsd_file_find_locked(struct inode *inode, unsigned int may_flags, unsigned char need = may_flags & NFSD_FILE_MAY_MASK; hlist_for_each_entry_rcu(nf, &nfsd_file_hashtbl[hashval].nfb_head, - nf_node) { + nf_node, lockdep_is_held(&nfsd_file_hashtbl[hashval].nfb_lock)) { if ((need & nf->nf_may) != need) continue; if (nf->nf_inode != inode)