summaryrefslogtreecommitdiff
path: root/fs/nfsd/netns.h
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2021-12-01 02:58:14 +0300
committerChuck Lever <chuck.lever@oracle.com>2021-12-13 21:42:59 +0300
commit1463b38e7cf34d4cc60f41daff459ad807b2e408 (patch)
tree0e428f9bc63900ec78202075d1cf3db7228b191a /fs/nfsd/netns.h
parent1e37d0e5bda45881eea1bec4b812def72c7d4aea (diff)
downloadlinux-1463b38e7cf34d4cc60f41daff459ad807b2e408.tar.xz
NFSD: simplify per-net file cache management
We currently have a 'laundrette' for closing cached files - a different work-item for each network-namespace. These 'laundrettes' (aka struct nfsd_fcache_disposal) are currently on a list, and are freed using rcu. The list is not necessary as we have a per-namespace structure (struct nfsd_net) which can hold a link to the nfsd_fcache_disposal. The use of kfree_rcu is also unnecessary as the cache is cleaned of all files associated with a given namespace, and no new files can be added, before the nfsd_fcache_disposal is freed. So add a '->fcache_disposal' link to nfsd_net, and discard the list management and rcu usage. Signed-off-by: NeilBrown <neilb@suse.de> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'fs/nfsd/netns.h')
-rw-r--r--fs/nfsd/netns.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/nfsd/netns.h b/fs/nfsd/netns.h
index 021acdc0d03b..9e8b77d2a3a4 100644
--- a/fs/nfsd/netns.h
+++ b/fs/nfsd/netns.h
@@ -185,6 +185,8 @@ struct nfsd_net {
/* utsname taken from the process that starts the server */
char nfsd_name[UNX_MAXNODENAME+1];
+
+ struct nfsd_fcache_disposal *fcache_disposal;
};
/* Simple check to find out if a given net was properly initialized */