summaryrefslogtreecommitdiff
path: root/net/sunrpc/svc.c
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2023-01-08 19:29:51 +0300
committerChuck Lever <chuck.lever@oracle.com>2023-02-20 17:20:28 +0300
commitfaca8978163bf8f6c0f3043b0f03cf3fe7bf9d64 (patch)
tree988a251873c1428edae40e2142fcb56409f7adb5 /net/sunrpc/svc.c
parent8dd41d70f331c342842e8d349d7a1f73b0ba7ccd (diff)
downloadlinux-faca8978163bf8f6c0f3043b0f03cf3fe7bf9d64.tar.xz
SUNRPC: Move svcxdr_init_encode() into ->accept methods
Refactor: So that the overhaul of each ->accept method can be done in separate smaller patches, temporarily move the svcxdr_init_encode() call into those methods. 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.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c
index ce75db5eb9bd..dc23fe44b5bd 100644
--- a/net/sunrpc/svc.c
+++ b/net/sunrpc/svc.c
@@ -1312,16 +1312,14 @@ svc_process_common(struct svc_rqst *rqstp, struct kvec *resv)
serv->sv_stats->rpccnt++;
trace_svc_process(rqstp, progp->pg_name);
- /* Build the reply header. */
- statp = resv->iov_base +resv->iov_len;
- svc_putnl(resv, RPC_SUCCESS);
+ statp = xdr_reserve_space(&rqstp->rq_res_stream, XDR_UNIT);
+ *statp = rpc_success;
/* un-reserve some of the out-queue now that we have a
* better idea of reply size
*/
if (procp->pc_xdrressize)
svc_reserve_auth(rqstp, procp->pc_xdrressize<<2);
- svcxdr_init_encode(rqstp);
/* Call the function that processes the request. */
rc = process.dispatch(rqstp, statp);