Commit 6d037b15 authored by Chuck Lever's avatar Chuck Lever

SUNRPC: Remove the rpc_stat variable in svc_process_common()

There's no RPC header field called rpc_stat; more precisely, the
variable appears to be recording an accept_stat value. But it looks
like we don't need to preserve this value at all, actually, so
simply remove the variable.
Reviewed-by: default avatarJeff Layton <jlayton@kernel.org>
Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
parent 99d074d6
...@@ -1232,12 +1232,9 @@ svc_process_common(struct svc_rqst *rqstp, struct kvec *resv) ...@@ -1232,12 +1232,9 @@ svc_process_common(struct svc_rqst *rqstp, struct kvec *resv)
struct svc_serv *serv = rqstp->rq_server; struct svc_serv *serv = rqstp->rq_server;
struct svc_process_info process; struct svc_process_info process;
__be32 *p, *statp; __be32 *p, *statp;
__be32 rpc_stat;
int auth_res, rc; int auth_res, rc;
__be32 *reply_statp; __be32 *reply_statp;
rpc_stat = rpc_success;
/* Will be turned off by GSS integrity and privacy services */ /* Will be turned off by GSS integrity and privacy services */
set_bit(RQ_SPLICE_OK, &rqstp->rq_flags); set_bit(RQ_SPLICE_OK, &rqstp->rq_flags);
/* Will be turned off only when NFSv4 Sessions are used */ /* Will be turned off only when NFSv4 Sessions are used */
...@@ -1279,10 +1276,9 @@ svc_process_common(struct svc_rqst *rqstp, struct kvec *resv) ...@@ -1279,10 +1276,9 @@ svc_process_common(struct svc_rqst *rqstp, struct kvec *resv)
case SVC_OK: case SVC_OK:
break; break;
case SVC_GARBAGE: case SVC_GARBAGE:
goto err_garbage; goto err_garbage_args;
case SVC_SYSERR: case SVC_SYSERR:
rpc_stat = rpc_system_err; goto err_system_err;
goto err_bad;
case SVC_DENIED: case SVC_DENIED:
goto err_bad_auth; goto err_bad_auth;
case SVC_CLOSE: case SVC_CLOSE:
...@@ -1296,8 +1292,7 @@ svc_process_common(struct svc_rqst *rqstp, struct kvec *resv) ...@@ -1296,8 +1292,7 @@ svc_process_common(struct svc_rqst *rqstp, struct kvec *resv)
if (progp == NULL) if (progp == NULL)
goto err_bad_prog; goto err_bad_prog;
rpc_stat = progp->pg_init_request(rqstp, progp, &process); switch (progp->pg_init_request(rqstp, progp, &process)) {
switch (rpc_stat) {
case rpc_success: case rpc_success:
break; break;
case rpc_prog_unavail: case rpc_prog_unavail:
...@@ -1408,13 +1403,16 @@ svc_process_common(struct svc_rqst *rqstp, struct kvec *resv) ...@@ -1408,13 +1403,16 @@ svc_process_common(struct svc_rqst *rqstp, struct kvec *resv)
svc_putnl(resv, RPC_PROC_UNAVAIL); svc_putnl(resv, RPC_PROC_UNAVAIL);
goto sendit; goto sendit;
err_garbage: err_garbage_args:
svc_printk(rqstp, "failed to decode args\n"); svc_printk(rqstp, "failed to decode RPC header\n");
serv->sv_stats->rpcbadfmt++;
svc_putnl(resv, RPC_GARBAGE_ARGS);
goto sendit;
rpc_stat = rpc_garbage_args; err_system_err:
err_bad:
serv->sv_stats->rpcbadfmt++; serv->sv_stats->rpcbadfmt++;
svc_putnl(resv, ntohl(rpc_stat)); svc_putnl(resv, RPC_SYSTEM_ERR);
goto sendit; goto sendit;
} }
......
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