summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2022-11-02 01:05:03 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2022-11-02 01:05:03 +0300
commit6eafb4a13dde4998bfef03e7e862eeb7f522d2fa (patch)
tree70274300ff649f13afbb5db3a43dfe697a20c5a9 /fs
parent54917c90c2cfc6cf3be6deb143cf3967b6dd8d3b (diff)
parentd3aefd2b29ff5ffdeb5c06a7d3191a027a18cdb8 (diff)
downloadlinux-6eafb4a13dde4998bfef03e7e862eeb7f522d2fa.tar.xz
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.c5
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);
}