aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2022-11-01 15:05:03 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2022-11-01 15:05:03 -0700
commit6eafb4a13dde4998bfef03e7e862eeb7f522d2fa (patch)
tree70274300ff649f13afbb5db3a43dfe697a20c5a9 /fs
parentMerge tag 'nolibc-urgent.2022.10.28a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu (diff)
parentnfsd: fix net-namespace logic in __nfsd_file_cache_purge (diff)
downloadlinux-dev-6eafb4a13dde4998bfef03e7e862eeb7f522d2fa.tar.xz
linux-dev-6eafb4a13dde4998bfef03e7e862eeb7f522d2fa.zip
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);
}