aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc
diff options
context:
space:
mode:
authorJ.Bruce Fields <bfields@fieldses.org>2006-10-04 05:16:08 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-04 10:55:19 -0400
commit8f8e05c5708d7e9017c47f395f8b1498f7f52922 (patch)
tree6972bf60f7d4ae27933af29ffdf694982b121194 /net/sunrpc
parent5b304bc5bfccc82b856e876e829c260df8e67ff2 (diff)
[PATCH] knfsd: svcrpc: use consistent variable name for the reply state
The rpc reply has multiple levels of error returns. The code here contributes to the confusion by using "accept_statp" for a pointer to what the rfc (and wireshark, etc.) refer to as the "reply_stat". (The confusion is compounded by the fact that the rfc also has an "accept_stat" which follows the reply_stat in the succesful case.) Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'net/sunrpc')
-rw-r--r--net/sunrpc/svc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c
index 550441d13a08..c2c8bb20d07f 100644
--- a/net/sunrpc/svc.c
+++ b/net/sunrpc/svc.c
@@ -699,7 +699,7 @@ svc_process(struct svc_rqst *rqstp)
699 u32 dir, prog, vers, proc; 699 u32 dir, prog, vers, proc;
700 __be32 auth_stat, rpc_stat; 700 __be32 auth_stat, rpc_stat;
701 int auth_res; 701 int auth_res;
702 __be32 *accept_statp; 702 __be32 *reply_statp;
703 703
704 rpc_stat = rpc_success; 704 rpc_stat = rpc_success;
705 705
@@ -740,7 +740,7 @@ svc_process(struct svc_rqst *rqstp)
740 goto err_bad_rpc; 740 goto err_bad_rpc;
741 741
742 /* Save position in case we later decide to reject: */ 742 /* Save position in case we later decide to reject: */
743 accept_statp = resv->iov_base + resv->iov_len; 743 reply_statp = resv->iov_base + resv->iov_len;
744 744
745 svc_putnl(resv, 0); /* ACCEPT */ 745 svc_putnl(resv, 0); /* ACCEPT */
746 746
@@ -888,7 +888,7 @@ err_bad_auth:
888 dprintk("svc: authentication failed (%d)\n", ntohl(auth_stat)); 888 dprintk("svc: authentication failed (%d)\n", ntohl(auth_stat));
889 serv->sv_stats->rpcbadauth++; 889 serv->sv_stats->rpcbadauth++;
890 /* Restore write pointer to location of accept status: */ 890 /* Restore write pointer to location of accept status: */
891 xdr_ressize_check(rqstp, accept_statp); 891 xdr_ressize_check(rqstp, reply_statp);
892 svc_putnl(resv, 1); /* REJECT */ 892 svc_putnl(resv, 1); /* REJECT */
893 svc_putnl(resv, 1); /* AUTH_ERROR */ 893 svc_putnl(resv, 1); /* AUTH_ERROR */
894 svc_putnl(resv, ntohl(auth_stat)); /* status */ 894 svc_putnl(resv, ntohl(auth_stat)); /* status */