diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2022-11-01 15:05:03 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2022-11-01 15:05:03 -0700 |
commit | 6eafb4a13dde4998bfef03e7e862eeb7f522d2fa (patch) | |
tree | 70274300ff649f13afbb5db3a43dfe697a20c5a9 /fs | |
parent | 54917c90c2cfc6cf3be6deb143cf3967b6dd8d3b (diff) | |
parent | d3aefd2b29ff5ffdeb5c06a7d3191a027a18cdb8 (diff) |
Merge tag 'nfsd-6.1-3' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux
Pull nfsd fix from Chuck Lever:
- Fix a loop that occurs when using multiple net namespaces
* tag 'nfsd-6.1-3' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux:
nfsd: fix net-namespace logic in __nfsd_file_cache_purge
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nfsd/filecache.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/nfsd/filecache.c b/fs/nfsd/filecache.c index 29a62db155fb..adc4e87a71d2 100644 --- a/fs/nfsd/filecache.c +++ b/fs/nfsd/filecache.c @@ -893,9 +893,8 @@ __nfsd_file_cache_purge(struct net *net) nf = rhashtable_walk_next(&iter); while (!IS_ERR_OR_NULL(nf)) { - if (net && nf->nf_net != net) - continue; - nfsd_file_unhash_and_dispose(nf, &dispose); + if (!net || nf->nf_net == net) + nfsd_file_unhash_and_dispose(nf, &dispose); nf = rhashtable_walk_next(&iter); } |