summaryrefslogtreecommitdiff
path: root/net/sunrpc/svc.c
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2023-01-02 12:07:45 -0500
committerChuck Lever <chuck.lever@oracle.com>2023-02-20 09:20:19 -0500
commit4119bd0306652776cb0b7caa3aea5b2a93aecb89 (patch)
treec13ceb31b9a0a8969b1f4133c0b37c7e5f63addd /net/sunrpc/svc.c
parent2009e32997ed568a305cf9bc7bf27d22e0f6ccda (diff)
SUNRPC: Eliminate unneeded variable
Clean up: Saving the RPC program number in two places is unnecessary. Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'net/sunrpc/svc.c')
-rw-r--r--net/sunrpc/svc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c
index 910250a04fc1..c3c80d2709fb 100644
--- a/net/sunrpc/svc.c
+++ b/net/sunrpc/svc.c
@@ -1232,7 +1232,7 @@ svc_process_common(struct svc_rqst *rqstp, struct kvec *argv, struct kvec *resv)
struct svc_serv *serv = rqstp->rq_server;
struct svc_process_info process;
__be32 *statp;
- u32 prog, vers;
+ u32 vers;
__be32 rpc_stat;
int auth_res, rc;
__be32 *reply_statp;
@@ -1259,12 +1259,12 @@ svc_process_common(struct svc_rqst *rqstp, struct kvec *argv, struct kvec *resv)
svc_putnl(resv, 0); /* ACCEPT */
- rqstp->rq_prog = prog = svc_getnl(argv); /* program number */
+ rqstp->rq_prog = svc_getnl(argv); /* program number */
rqstp->rq_vers = svc_getnl(argv); /* version number */
rqstp->rq_proc = svc_getnl(argv); /* procedure number */
for (progp = serv->sv_program; progp; progp = progp->pg_next)
- if (prog == progp->pg_prog)
+ if (rqstp->rq_prog == progp->pg_prog)
break;
/*
@@ -1389,7 +1389,7 @@ err_bad_auth:
goto sendit;
err_bad_prog:
- dprintk("svc: unknown program %d\n", prog);
+ dprintk("svc: unknown program %d\n", rqstp->rq_prog);
serv->sv_stats->rpcbadfmt++;
svc_putnl(resv, RPC_PROG_UNAVAIL);
goto sendit;