]> git.baikalelectronics.ru Git - kernel.git/commit
lockd: use svc_set_num_threads() for thread start and stop
authorNeilBrown <neilb@suse.de>
Mon, 29 Nov 2021 04:51:25 +0000 (15:51 +1100)
committerChuck Lever <chuck.lever@oracle.com>
Mon, 13 Dec 2021 18:42:58 +0000 (13:42 -0500)
commit3cd015e5c52ea65ef6f42544ba93b36b9db09743
tree31c94f6addd44d371b16af2293def80d9381a8ea
parentf4dee344f2855a11bbb9e363253bf3be53f3d817
lockd: use svc_set_num_threads() for thread start and stop

svc_set_num_threads() does everything that lockd_start_svc() does, except
set sv_maxconn.  It also (when passed 0) finds the threads and
stops them with kthread_stop().

So move the setting for sv_maxconn, and use svc_set_num_thread()

We now don't need nlmsvc_task.

Now that we use svc_set_num_threads() it makes sense to set svo_module.
This request that the thread exists with module_put_and_exit().
Also fix the documentation for svo_module to make this explicit.

svc_prepare_thread is now only used where it is defined, so it can be
made static.

Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
fs/lockd/svc.c
include/linux/sunrpc/svc.h
net/sunrpc/svc.c