aboutsummaryrefslogtreecommitdiff
path: root/fs/nfsd/nfs4state.c
diff options
context:
space:
mode:
authorGravatar Trond Myklebust <trond.myklebust@hammerspace.com> 2021-03-13 16:08:47 -0500
committerGravatar Chuck Lever <chuck.lever@oracle.com> 2021-03-22 10:19:03 -0400
commitc6c7f2a84da459bcc3714044e74a9cb66de31039 (patch)
tree985787f78b4a5ec9872167996cc94256b4a6409f /fs/nfsd/nfs4state.c
parentnfsd: Log client tracking type log message as info instead of warning (diff)
downloadlinux-c6c7f2a84da459bcc3714044e74a9cb66de31039.tar.gz
linux-c6c7f2a84da459bcc3714044e74a9cb66de31039.tar.bz2
linux-c6c7f2a84da459bcc3714044e74a9cb66de31039.zip
nfsd: Ensure knfsd shuts down when the "nfsd" pseudofs is unmounted
In order to ensure that knfsd threads don't linger once the nfsd pseudofs is unmounted (e.g. when the container is killed) we let nfsd_umount() shut down those threads and wait for them to exit. This also should ensure that we don't need to do a kernel mount of the pseudofs, since the thread lifetime is now limited by the lifetime of the filesystem. Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'fs/nfsd/nfs4state.c')
-rw-r--r--fs/nfsd/nfs4state.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 1aa7d4ee7c15..e011b407d007 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -7326,14 +7326,9 @@ nfs4_state_start_net(struct net *net)
struct nfsd_net *nn = net_generic(net, nfsd_net_id);
int ret;
- ret = get_nfsdfs(net);
- if (ret)
- return ret;
ret = nfs4_state_create_net(net);
- if (ret) {
- mntput(nn->nfsd_mnt);
+ if (ret)
return ret;
- }
locks_start_grace(net, &nn->nfsd4_manager);
nfsd4_client_tracking_init(net);
if (nn->track_reclaim_completes && nn->reclaim_str_hashtbl_size == 0)
@@ -7403,7 +7398,6 @@ nfs4_state_shutdown_net(struct net *net)
nfsd4_client_tracking_exit(net);
nfs4_state_destroy_net(net);
- mntput(nn->nfsd_mnt);
}
void