mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-03-16 12:14:06 +00:00
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: NeilBrown <neilb@suse.de> Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
This commit is contained in:
parent
9f28a971ee
commit
f78116d3bf
5 changed files with 3 additions and 10 deletions
|
@ -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 @@ out_baddir:
|
|||
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);
|
||||
|
|
Loading…
Add table
Reference in a new issue