diff options
author | NeilBrown <neilb@suse.de> | 2021-12-01 00:58:14 +0100 |
---|---|---|
committer | Chuck Lever <chuck.lever@oracle.com> | 2021-12-13 19:42:59 +0100 |
commit | 1463b38e7cf34d4cc60f41daff459ad807b2e408 (patch) | |
tree | 0e428f9bc63900ec78202075d1cf3db7228b191a /fs/nfsd/netns.h | |
parent | NFSD: Fix inconsistent indenting (diff) | |
download | linux-1463b38e7cf34d4cc60f41daff459ad807b2e408.tar.xz linux-1463b38e7cf34d4cc60f41daff459ad807b2e408.zip |
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.h | 2 |
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 */ |