diff options
author | Madhuparna Bhowmik <madhuparnabhowmik10@gmail.com> | 2020-02-13 16:03:59 +0100 |
---|---|---|
committer | Chuck Lever <chuck.lever@oracle.com> | 2020-03-16 17:04:31 +0100 |
commit | 057a2274357786c637093866c6668d5ff048436f (patch) | |
tree | 8a54cf50ba89461d5960954a1642b2403da921f0 /fs/nfsd/filecache.c | |
parent | fs: nfsd: nfs4state.c: Use built-in RCU list checking (diff) | |
download | linux-057a2274357786c637093866c6668d5ff048436f.tar.xz linux-057a2274357786c637093866c6668d5ff048436f.zip |
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 <madhuparnabhowmik10@gmail.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'fs/nfsd/filecache.c')
-rw-r--r-- | fs/nfsd/filecache.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) |