diff options
author | NeilBrown <neilb@suse.de> | 2023-09-11 17:39:04 +0300 |
---|---|---|
committer | Chuck Lever <chuck.lever@oracle.com> | 2023-10-16 19:44:04 +0300 |
commit | fa341560ca7458f4396d5a0771cb5f2358d8535d (patch) | |
tree | c8c18f267b8d7443da0e0dc581637b9c77353a9c /fs/nfsd/nfssvc.c | |
parent | f4578ba11c4a211d45877babe56c84d922301576 (diff) | |
download | linux-fa341560ca7458f4396d5a0771cb5f2358d8535d.tar.xz |
SUNRPC: change how svc threads are asked to exit.
svc threads are currently stopped using kthread_stop(). This requires
identifying a specific thread. However we don't care which thread
stops, just as long as one does.
So instead, set a flag in the svc_pool to say that a thread needs to
die, and have each thread check this flag instead of calling
kthread_should_stop(). The first thread to find and clear this flag
then moves towards exiting.
This removes an explicit dependency on sp_all_threads which will make a
future patch simpler.
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'fs/nfsd/nfssvc.c')
-rw-r--r-- | fs/nfsd/nfssvc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfsd/nfssvc.c b/fs/nfsd/nfssvc.c index c7af1095f6b5..0b03a2e50dee 100644 --- a/fs/nfsd/nfssvc.c +++ b/fs/nfsd/nfssvc.c @@ -957,7 +957,7 @@ nfsd(void *vrqstp) /* * The main request loop */ - while (!kthread_should_stop()) { + while (!svc_thread_should_stop(rqstp)) { /* Update sv_maxconn if it has changed */ rqstp->rq_server->sv_maxconn = nn->max_connections; |