Skip to content

Commit f78116d

Browse files
neilbrownchucklever
authored andcommitted
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>
1 parent 9f28a97 commit f78116d

File tree

5 files changed

+3
-10
lines changed

5 files changed

+3
-10
lines changed

fs/lockd/svc.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,6 @@ lockd(void *vrqstp)
132132
*/
133133
while (!kthread_should_stop()) {
134134
long timeout = MAX_SCHEDULE_TIMEOUT;
135-
RPC_IFDEBUG(char buf[RPC_MAX_ADDRBUFLEN]);
136135

137136
/* update sv_maxconn if it has changed */
138137
rqstp->rq_server->sv_maxconn = nlm_max_connections;
@@ -146,10 +145,6 @@ lockd(void *vrqstp)
146145
err = svc_recv(rqstp, timeout);
147146
if (err == -EAGAIN || err == -EINTR)
148147
continue;
149-
dprintk("lockd: request from %s\n",
150-
svc_print_addr(rqstp, buf, sizeof(buf)));
151-
152-
svc_process(rqstp);
153148
}
154149
if (nlmsvc_ops)
155150
nlmsvc_invalidate_all();

fs/nfs/callback.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ nfs4_callback_svc(void *vrqstp)
8686
err = svc_recv(rqstp, MAX_SCHEDULE_TIMEOUT);
8787
if (err == -EAGAIN || err == -EINTR)
8888
continue;
89-
svc_process(rqstp);
9089
}
9190

9291
svc_exit_thread(rqstp);

fs/nfsd/nfssvc.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -970,8 +970,7 @@ nfsd(void *vrqstp)
970970
;
971971
if (err == -EINTR)
972972
break;
973-
validate_process_creds();
974-
svc_process(rqstp);
973+
975974
validate_process_creds();
976975
}
977976

net/sunrpc/svc.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1516,7 +1516,6 @@ void svc_process(struct svc_rqst *rqstp)
15161516
out_drop:
15171517
svc_drop(rqstp);
15181518
}
1519-
EXPORT_SYMBOL_GPL(svc_process);
15201519

15211520
#if defined(CONFIG_SUNRPC_BACKCHANNEL)
15221521
/*

net/sunrpc/svc_xprt.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -906,7 +906,8 @@ int svc_recv(struct svc_rqst *rqstp, long timeout)
906906
if (serv->sv_stats)
907907
serv->sv_stats->netcnt++;
908908
rqstp->rq_stime = ktime_get();
909-
return len;
909+
svc_process(rqstp);
910+
return 0;
910911
out_release:
911912
rqstp->rq_res.len = 0;
912913
svc_xprt_release(rqstp);

0 commit comments

Comments
 (0)