summaryrefslogtreecommitdiff
path: root/fs/nfs/callback.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2023-07-18 16:38:08 +1000
committerChuck Lever <chuck.lever@oracle.com>2023-08-29 17:45:22 -0400
commit7b719e2bf342a59e88b2b6215b98ca4cf824bc58 (patch)
treeeb26d38640ed8fc60561be0dd528ff7ecbfe288a /fs/nfs/callback.c
parentf78116d3bf4fd7a84451e1a2adc35df7a63fbbf4 (diff)
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/nfs/callback.c')
-rw-r--r--fs/nfs/callback.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/fs/nfs/callback.c b/fs/nfs/callback.c
index 2d94384bd6a9..54155b484f7b 100644
--- a/fs/nfs/callback.c
+++ b/fs/nfs/callback.c
@@ -74,19 +74,12 @@ out_err:
static int
nfs4_callback_svc(void *vrqstp)
{
- int err;
struct svc_rqst *rqstp = vrqstp;
set_freezable();
- while (!kthread_freezable_should_stop(NULL)) {
- /*
- * Listen for a request on the socket
- */
- err = svc_recv(rqstp, MAX_SCHEDULE_TIMEOUT);
- if (err == -EAGAIN || err == -EINTR)
- continue;
- }
+ while (!kthread_freezable_should_stop(NULL))
+ svc_recv(rqstp, MAX_SCHEDULE_TIMEOUT);
svc_exit_thread(rqstp);
return 0;