diff options
author | Trond Myklebust | 2019-09-02 13:02:55 -0400 |
---|---|---|
committer | J. Bruce Fields | 2019-09-10 09:23:41 -0400 |
commit | 5e113224c17e2fb156b785ddbbc48a0209fddb0c (patch) | |
tree | dd3f0e389afb149e37ab9a96306f4f8445398169 /fs/nfsd/filecache.h | |
parent | 2b86e3aaf993a3ea6c73dfcf86143061a40c62e6 (diff) |
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.h | 3 |
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); |