diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2023-01-02 20:07:39 +0300 |
---|---|---|
committer | Chuck Lever <chuck.lever@oracle.com> | 2023-02-20 17:20:19 +0300 |
commit | 2009e32997ed568a305cf9bc7bf27d22e0f6ccda (patch) | |
tree | a2f91ca15bc0b33b98f104ff53b61ac027081dbc /net/sunrpc/svc.c | |
parent | 6898b47a0f9e118636d82c3e2c39e50f82290a91 (diff) | |
download | linux-2009e32997ed568a305cf9bc7bf27d22e0f6ccda.tar.xz |
SUNRPC: Re-order construction of the first reply fields
Clean up: Group these together for legibility.
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.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c index acac00bc98cc..910250a04fc1 100644 --- a/net/sunrpc/svc.c +++ b/net/sunrpc/svc.c @@ -1248,19 +1248,15 @@ svc_process_common(struct svc_rqst *rqstp, struct kvec *argv, struct kvec *resv) set_bit(RQ_USEDEFERRAL, &rqstp->rq_flags); clear_bit(RQ_DROPME, &rqstp->rq_flags); + /* Construct the first words of the reply: */ svc_putu32(resv, rqstp->rq_xid); + svc_putnl(resv, RPC_REPLY); + reply_statp = resv->iov_base + resv->iov_len; vers = svc_getnl(argv); - - /* First words of reply: */ - svc_putnl(resv, 1); /* REPLY */ - if (vers != 2) /* RPC version number */ goto err_bad_rpc; - /* Save position in case we later decide to reject: */ - reply_statp = resv->iov_base + resv->iov_len; - svc_putnl(resv, 0); /* ACCEPT */ rqstp->rq_prog = prog = svc_getnl(argv); /* program number */ |