Commit f78116d3 authored by NeilBrown's avatar NeilBrown Committed by Chuck Lever

SUNRPC: call svc_process() from svc_recv().

All callers of svc_recv() go on to call svc_process() on success.
Simplify callers by having svc_recv() do that for them.

This loses one call to validate_process_creds() in nfsd.  That was
debugging code added 14 years ago.  I don't think we need to keep it.
Signed-off-by: default avatarNeilBrown <neilb@suse.de>
Reviewed-by: default avatarJeff Layton <jlayton@kernel.org>
Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
parent 9f28a971
......@@ -132,7 +132,6 @@ lockd(void *vrqstp)
*/
while (!kthread_should_stop()) {
long timeout = MAX_SCHEDULE_TIMEOUT;
RPC_IFDEBUG(char buf[RPC_MAX_ADDRBUFLEN]);
/* update sv_maxconn if it has changed */
rqstp->rq_server->sv_maxconn = nlm_max_connections;
......@@ -146,10 +145,6 @@ lockd(void *vrqstp)
err = svc_recv(rqstp, timeout);
if (err == -EAGAIN || err == -EINTR)
continue;
dprintk("lockd: request from %s\n",
svc_print_addr(rqstp, buf, sizeof(buf)));
svc_process(rqstp);
}
if (nlmsvc_ops)
nlmsvc_invalidate_all();
......
......@@ -86,7 +86,6 @@ nfs4_callback_svc(void *vrqstp)
err = svc_recv(rqstp, MAX_SCHEDULE_TIMEOUT);
if (err == -EAGAIN || err == -EINTR)
continue;
svc_process(rqstp);
}
svc_exit_thread(rqstp);
......
......@@ -970,8 +970,7 @@ nfsd(void *vrqstp)
;
if (err == -EINTR)
break;
validate_process_creds();
svc_process(rqstp);
validate_process_creds();
}
......
......@@ -1516,7 +1516,6 @@ void svc_process(struct svc_rqst *rqstp)
out_drop:
svc_drop(rqstp);
}
EXPORT_SYMBOL_GPL(svc_process);
#if defined(CONFIG_SUNRPC_BACKCHANNEL)
/*
......
......@@ -906,7 +906,8 @@ int svc_recv(struct svc_rqst *rqstp, long timeout)
if (serv->sv_stats)
serv->sv_stats->netcnt++;
rqstp->rq_stime = ktime_get();
return len;
svc_process(rqstp);
return 0;
out_release:
rqstp->rq_res.len = 0;
svc_xprt_release(rqstp);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment