[PATCH 03/13] svcrpc: use consistent variable name for the reply state

J. Bruce Fields bfields at fieldses.org
Fri Sep 1 00:56:42 EDT 2006


From: J. Bruce Fields <bfields at fieldses.org>

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 at citi.umich.edu>
---

 net/sunrpc/svc.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c
index b76a227..6bfee67 100644
--- a/net/sunrpc/svc.c
+++ b/net/sunrpc/svc.c
@@ -260,7 +260,7 @@ svc_process(struct svc_serv *serv, struc
 	u32			dir, prog, vers, proc,
 				auth_stat, rpc_stat;
 	int			auth_res;
-	u32			*accept_statp;
+	u32			*reply_statp;
 
 	rpc_stat = rpc_success;
 
@@ -301,7 +301,7 @@ svc_process(struct svc_serv *serv, struc
 		goto err_bad_rpc;
 
 	/* Save position in case we later decide to reject: */
-	accept_statp = resv->iov_base + resv->iov_len;
+	reply_statp = resv->iov_base + resv->iov_len;
 
 	svc_putu32(resv, xdr_zero);		/* ACCEPT */
 
@@ -449,7 +449,7 @@ err_bad_auth:
 	dprintk("svc: authentication failed (%d)\n", ntohl(auth_stat));
 	serv->sv_stats->rpcbadauth++;
 	/* Restore write pointer to location of accept status: */
-	xdr_ressize_check(rqstp, accept_statp);
+	xdr_ressize_check(rqstp, reply_statp);
 	svc_putu32(resv, xdr_one);	/* REJECT */
 	svc_putu32(resv, xdr_one);	/* AUTH_ERROR */
 	svc_putu32(resv, auth_stat);	/* status */


More information about the NFSv4 mailing list