summaryrefslogtreecommitdiff
path: root/include/linux/lockd
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2023-10-11 01:31:22 +0300
committerChuck Lever <chuck.lever@oracle.com>2023-10-16 19:44:04 +0300
commitf4578ba11c4a211d45877babe56c84d922301576 (patch)
treec7bac39913162cc5c30cce98592ab7914afa23ac /include/linux/lockd
parent063ab935a48b3a2854f433957adbb2bde396ed22 (diff)
downloadlinux-f4578ba11c4a211d45877babe56c84d922301576.tar.xz
lockd: hold a reference to nlmsvc_serv while stopping the thread.
Both nfsd and nfsv4-callback take a temporary reference to the svc_serv while calling svc_set_num_threads() to stop the last thread. lockd does not. This extra reference prevents the scv_serv from being freed when the last thread drops its reference count. This is not currently needed for lockd as the svc_serv is not accessed after the last thread is told to exit. However a future patch will require svc_exit_thread() to access the svc_serv after the svc_put() so it will need the code that calls svc_set_num_threads() to keep a reference and keep the svc_serv active. So copy the pattern from nfsd and nfsv4-cb to lockd, and take a reference around svc_set_num_threads(.., 0) Reviewed-by: Jeff Layton <jlayton@kernel.org> Tested-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: NeilBrown <neilb@suse.de> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'include/linux/lockd')
0 files changed, 0 insertions, 0 deletions