aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd/filecache.h
diff options
context:
space:
mode:
authorTrond Myklebust <trondmy@gmail.com>2019-09-02 13:02:55 -0400
committerJ. Bruce Fields <bfields@redhat.com>2019-09-10 09:23:41 -0400
commit5e113224c17e2fb156b785ddbbc48a0209fddb0c (patch)
treedd3f0e389afb149e37ab9a96306f4f8445398169 /fs/nfsd/filecache.h
parentnfsd: eliminate an unnecessary acl size limit (diff)
downloadlinux-dev-5e113224c17e2fb156b785ddbbc48a0209fddb0c.tar.xz
linux-dev-5e113224c17e2fb156b785ddbbc48a0209fddb0c.zip
nfsd: nfsd_file cache entries should be per net namespace
Ensure that we can safely clear out the file cache entries when the nfs server is shut down on a container. Otherwise, the file cache may end up pinning the mounts. Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/filecache.h')
-rw-r--r--fs/nfsd/filecache.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/nfsd/filecache.h b/fs/nfsd/filecache.h
index 0c0c67166b87..851d9abf54c2 100644
--- a/fs/nfsd/filecache.h
+++ b/fs/nfsd/filecache.h
@@ -34,6 +34,7 @@ struct nfsd_file {
struct rcu_head nf_rcu;
struct file *nf_file;
const struct cred *nf_cred;
+ struct net *nf_net;
#define NFSD_FILE_HASHED (0)
#define NFSD_FILE_PENDING (1)
#define NFSD_FILE_BREAK_READ (2)
@@ -48,7 +49,7 @@ struct nfsd_file {
};
int nfsd_file_cache_init(void);
-void nfsd_file_cache_purge(void);
+void nfsd_file_cache_purge(struct net *);
void nfsd_file_cache_shutdown(void);
void nfsd_file_put(struct nfsd_file *nf);
struct nfsd_file *nfsd_file_get(struct nfsd_file *nf);