summaryrefslogtreecommitdiffstats
path: root/net/sunrpc/svc.c
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2022-09-12 23:22:38 +0200
committerChuck Lever <chuck.lever@oracle.com>2022-09-26 20:02:42 +0200
commit103cc1fafee48adb91fca0e19deb869fd23e46ab (patch)
treec4e996632c0554e5a585cee77640a82063122f6d /net/sunrpc/svc.c
parentSUNRPC: Optimize svc_process() (diff)
downloadlinux-103cc1fafee48adb91fca0e19deb869fd23e46ab.tar.xz
linux-103cc1fafee48adb91fca0e19deb869fd23e46ab.zip
SUNRPC: Parametrize how much of argsize should be zeroed
Currently, SUNRPC clears the whole of .pc_argsize before processing each incoming RPC transaction. Add an extra parameter to struct svc_procedure to enable upper layers to reduce the amount of each operation's argument structure that is zeroed by SUNRPC. The size of struct nfsd4_compoundargs, in particular, is a lot to clear on each incoming RPC Call. A subsequent patch will cut this down to something closer to what NFSv2 and NFSv3 uses. This patch should cause no behavior changes. Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to '')
-rw-r--r--net/sunrpc/svc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c
index 4268145490a4..32a537f852fe 100644
--- a/net/sunrpc/svc.c
+++ b/net/sunrpc/svc.c
@@ -1205,7 +1205,7 @@ svc_generic_init_request(struct svc_rqst *rqstp,
goto err_bad_proc;
/* Initialize storage for argp and resp */
- memset(rqstp->rq_argp, 0, procp->pc_argsize);
+ memset(rqstp->rq_argp, 0, procp->pc_argzero);
memset(rqstp->rq_resp, 0, procp->pc_ressize);
/* Bump per-procedure stats counter */