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) ...@@ -132,7 +132,6 @@ lockd(void *vrqstp)
*/ */
while (!kthread_should_stop()) { while (!kthread_should_stop()) {
long timeout = MAX_SCHEDULE_TIMEOUT; long timeout = MAX_SCHEDULE_TIMEOUT;
RPC_IFDEBUG(char buf[RPC_MAX_ADDRBUFLEN]);
/* update sv_maxconn if it has changed */ /* update sv_maxconn if it has changed */
rqstp->rq_server->sv_maxconn = nlm_max_connections; rqstp->rq_server->sv_maxconn = nlm_max_connections;
...@@ -146,10 +145,6 @@ lockd(void *vrqstp) ...@@ -146,10 +145,6 @@ lockd(void *vrqstp)
err = svc_recv(rqstp, timeout); err = svc_recv(rqstp, timeout);
if (err == -EAGAIN || err == -EINTR) if (err == -EAGAIN || err == -EINTR)
continue; continue;
dprintk("lockd: request from %s\n",
svc_print_addr(rqstp, buf, sizeof(buf)));
svc_process(rqstp);
} }
if (nlmsvc_ops) if (nlmsvc_ops)
nlmsvc_invalidate_all(); nlmsvc_invalidate_all();
......
...@@ -86,7 +86,6 @@ nfs4_callback_svc(void *vrqstp) ...@@ -86,7 +86,6 @@ nfs4_callback_svc(void *vrqstp)
err = svc_recv(rqstp, MAX_SCHEDULE_TIMEOUT); err = svc_recv(rqstp, MAX_SCHEDULE_TIMEOUT);
if (err == -EAGAIN || err == -EINTR) if (err == -EAGAIN || err == -EINTR)
continue; continue;
svc_process(rqstp);
} }
svc_exit_thread(rqstp); svc_exit_thread(rqstp);
......
...@@ -970,8 +970,7 @@ nfsd(void *vrqstp) ...@@ -970,8 +970,7 @@ nfsd(void *vrqstp)
; ;
if (err == -EINTR) if (err == -EINTR)
break; break;
validate_process_creds();
svc_process(rqstp);
validate_process_creds(); validate_process_creds();
} }
......
...@@ -1516,7 +1516,6 @@ void svc_process(struct svc_rqst *rqstp) ...@@ -1516,7 +1516,6 @@ void svc_process(struct svc_rqst *rqstp)
out_drop: out_drop:
svc_drop(rqstp); svc_drop(rqstp);
} }
EXPORT_SYMBOL_GPL(svc_process);
#if defined(CONFIG_SUNRPC_BACKCHANNEL) #if defined(CONFIG_SUNRPC_BACKCHANNEL)
/* /*
......
...@@ -906,7 +906,8 @@ int svc_recv(struct svc_rqst *rqstp, long timeout) ...@@ -906,7 +906,8 @@ int svc_recv(struct svc_rqst *rqstp, long timeout)
if (serv->sv_stats) if (serv->sv_stats)
serv->sv_stats->netcnt++; serv->sv_stats->netcnt++;
rqstp->rq_stime = ktime_get(); rqstp->rq_stime = ktime_get();
return len; svc_process(rqstp);
return 0;
out_release: out_release:
rqstp->rq_res.len = 0; rqstp->rq_res.len = 0;
svc_xprt_release(rqstp); 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