diff options
author | NeilBrown <neilb@suse.de> | 2023-07-18 08:38:08 +0200 |
---|---|---|
committer | Chuck Lever <chuck.lever@oracle.com> | 2023-08-29 23:45:22 +0200 |
commit | 7b719e2bf342a59e88b2b6215b98ca4cf824bc58 (patch) | |
tree | eb26d38640ed8fc60561be0dd528ff7ecbfe288a /fs/lockd/svc.c | |
parent | SUNRPC: call svc_process() from svc_recv(). (diff) | |
download | linux-7b719e2bf342a59e88b2b6215b98ca4cf824bc58.tar.xz linux-7b719e2bf342a59e88b2b6215b98ca4cf824bc58.zip |
SUNRPC: change svc_recv() to return void.
svc_recv() currently returns a 0 on success or one of two errors:
- -EAGAIN means no message was successfully received
- -EINTR means the thread has been told to stop
Previously nfsd would stop as the result of a signal as well as
following kthread_stop(). In that case the difference was useful: EINTR
means stop unconditionally. EAGAIN means stop if kthread_should_stop(),
continue otherwise.
Now threads only exit when kthread_should_stop() so we don't need the
distinction.
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'fs/lockd/svc.c')
-rw-r--r-- | fs/lockd/svc.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/fs/lockd/svc.c b/fs/lockd/svc.c index 91ef139a7757..cf4ff7d3564c 100644 --- a/fs/lockd/svc.c +++ b/fs/lockd/svc.c @@ -116,7 +116,6 @@ static void set_grace_period(struct net *net) static int lockd(void *vrqstp) { - int err = 0; struct svc_rqst *rqstp = vrqstp; struct net *net = &init_net; struct lockd_net *ln = net_generic(net, lockd_net_id); @@ -138,13 +137,7 @@ lockd(void *vrqstp) timeout = nlmsvc_retry_blocked(); - /* - * Find a socket with data available and call its - * recvfrom routine. - */ - err = svc_recv(rqstp, timeout); - if (err == -EAGAIN || err == -EINTR) - continue; + svc_recv(rqstp, timeout); } if (nlmsvc_ops) nlmsvc_invalidate_all(); |