]> git.baikalelectronics.ru Git - kernel.git/commit
nfsd: Ensure knfsd shuts down when the "nfsd" pseudofs is unmounted
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Sat, 13 Mar 2021 21:08:47 +0000 (16:08 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 6 Feb 2023 06:52:47 +0000 (07:52 +0100)
commita9c2351ea9b76ccb7effb25728605bec438618a6
treef852180b8976ef0f16c574fd164e113f4aa4aaac
parent903ebcbd3b27ff4b3ae1ba6296f7b13709a0f77a
nfsd: Ensure knfsd shuts down when the "nfsd" pseudofs is unmounted

commit 345d8ceeff3efa28a0e171b085ba0b8c6e106b16 upstream.

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>
Signed-off-by: Nikos Tsironis <ntsironis@arrikto.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/nfsd/netns.h
fs/nfsd/nfs4state.c
fs/nfsd/nfsctl.c
fs/nfsd/nfsd.h
fs/nfsd/nfssvc.c