SUNRPC: Parametrize how much of argsize should be zeroed
authorChuck Lever <chuck.lever@oracle.com>
Mon, 12 Sep 2022 21:22:38 +0000 (17:22 -0400)
committerChuck Lever <chuck.lever@oracle.com>
Mon, 26 Sep 2022 18:02:42 +0000 (14:02 -0400)
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>
fs/lockd/svc4proc.c
fs/lockd/svcproc.c
fs/nfs/callback_xdr.c
fs/nfsd/nfs2acl.c
fs/nfsd/nfs3acl.c
fs/nfsd/nfs3proc.c
fs/nfsd/nfs4proc.c
fs/nfsd/nfsproc.c
include/linux/sunrpc/svc.h
net/sunrpc/svc.c

index bf274f23969b302ade131711f354fb69a596adc2..284b019cb6529b999c9a2dbdd21f06f7c0325c38 100644 (file)
@@ -521,6 +521,7 @@ const struct svc_procedure nlmsvc_procedures4[24] = {
                .pc_decode = nlm4svc_decode_void,
                .pc_encode = nlm4svc_encode_void,
                .pc_argsize = sizeof(struct nlm_void),
+               .pc_argzero = sizeof(struct nlm_void),
                .pc_ressize = sizeof(struct nlm_void),
                .pc_xdrressize = St,
                .pc_name = "NULL",
@@ -530,6 +531,7 @@ const struct svc_procedure nlmsvc_procedures4[24] = {
                .pc_decode = nlm4svc_decode_testargs,
                .pc_encode = nlm4svc_encode_testres,
                .pc_argsize = sizeof(struct nlm_args),
+               .pc_argzero = sizeof(struct nlm_args),
                .pc_ressize = sizeof(struct nlm_res),
                .pc_xdrressize = Ck+St+2+No+Rg,
                .pc_name = "TEST",
@@ -539,6 +541,7 @@ const struct svc_procedure nlmsvc_procedures4[24] = {
                .pc_decode = nlm4svc_decode_lockargs,
                .pc_encode = nlm4svc_encode_res,
                .pc_argsize = sizeof(struct nlm_args),
+               .pc_argzero = sizeof(struct nlm_args),
                .pc_ressize = sizeof(struct nlm_res),
                .pc_xdrressize = Ck+St,
                .pc_name = "LOCK",
@@ -548,6 +551,7 @@ const struct svc_procedure nlmsvc_procedures4[24] = {
                .pc_decode = nlm4svc_decode_cancargs,
                .pc_encode = nlm4svc_encode_res,
                .pc_argsize = sizeof(struct nlm_args),
+               .pc_argzero = sizeof(struct nlm_args),
                .pc_ressize = sizeof(struct nlm_res),
                .pc_xdrressize = Ck+St,
                .pc_name = "CANCEL",
@@ -557,6 +561,7 @@ const struct svc_procedure nlmsvc_procedures4[24] = {
                .pc_decode = nlm4svc_decode_unlockargs,
                .pc_encode = nlm4svc_encode_res,
                .pc_argsize = sizeof(struct nlm_args),
+               .pc_argzero = sizeof(struct nlm_args),
                .pc_ressize = sizeof(struct nlm_res),
                .pc_xdrressize = Ck+St,
                .pc_name = "UNLOCK",
@@ -566,6 +571,7 @@ const struct svc_procedure nlmsvc_procedures4[24] = {
                .pc_decode = nlm4svc_decode_testargs,
                .pc_encode = nlm4svc_encode_res,
                .pc_argsize = sizeof(struct nlm_args),
+               .pc_argzero = sizeof(struct nlm_args),
                .pc_ressize = sizeof(struct nlm_res),
                .pc_xdrressize = Ck+St,
                .pc_name = "GRANTED",
@@ -575,6 +581,7 @@ const struct svc_procedure nlmsvc_procedures4[24] = {
                .pc_decode = nlm4svc_decode_testargs,
                .pc_encode = nlm4svc_encode_void,
                .pc_argsize = sizeof(struct nlm_args),
+               .pc_argzero = sizeof(struct nlm_args),
                .pc_ressize = sizeof(struct nlm_void),
                .pc_xdrressize = St,
                .pc_name = "TEST_MSG",
@@ -584,6 +591,7 @@ const struct svc_procedure nlmsvc_procedures4[24] = {
                .pc_decode = nlm4svc_decode_lockargs,
                .pc_encode = nlm4svc_encode_void,
                .pc_argsize = sizeof(struct nlm_args),
+               .pc_argzero = sizeof(struct nlm_args),
                .pc_ressize = sizeof(struct nlm_void),
                .pc_xdrressize = St,
                .pc_name = "LOCK_MSG",
@@ -593,6 +601,7 @@ const struct svc_procedure nlmsvc_procedures4[24] = {
                .pc_decode = nlm4svc_decode_cancargs,
                .pc_encode = nlm4svc_encode_void,
                .pc_argsize = sizeof(struct nlm_args),
+               .pc_argzero = sizeof(struct nlm_args),
                .pc_ressize = sizeof(struct nlm_void),
                .pc_xdrressize = St,
                .pc_name = "CANCEL_MSG",
@@ -602,6 +611,7 @@ const struct svc_procedure nlmsvc_procedures4[24] = {
                .pc_decode = nlm4svc_decode_unlockargs,
                .pc_encode = nlm4svc_encode_void,
                .pc_argsize = sizeof(struct nlm_args),
+               .pc_argzero = sizeof(struct nlm_args),
                .pc_ressize = sizeof(struct nlm_void),
                .pc_xdrressize = St,
                .pc_name = "UNLOCK_MSG",
@@ -611,6 +621,7 @@ const struct svc_procedure nlmsvc_procedures4[24] = {
                .pc_decode = nlm4svc_decode_testargs,
                .pc_encode = nlm4svc_encode_void,
                .pc_argsize = sizeof(struct nlm_args),
+               .pc_argzero = sizeof(struct nlm_args),
                .pc_ressize = sizeof(struct nlm_void),
                .pc_xdrressize = St,
                .pc_name = "GRANTED_MSG",
@@ -620,6 +631,7 @@ const struct svc_procedure nlmsvc_procedures4[24] = {
                .pc_decode = nlm4svc_decode_void,
                .pc_encode = nlm4svc_encode_void,
                .pc_argsize = sizeof(struct nlm_res),
+               .pc_argzero = sizeof(struct nlm_res),
                .pc_ressize = sizeof(struct nlm_void),
                .pc_xdrressize = St,
                .pc_name = "TEST_RES",
@@ -629,6 +641,7 @@ const struct svc_procedure nlmsvc_procedures4[24] = {
                .pc_decode = nlm4svc_decode_void,
                .pc_encode = nlm4svc_encode_void,
                .pc_argsize = sizeof(struct nlm_res),
+               .pc_argzero = sizeof(struct nlm_res),
                .pc_ressize = sizeof(struct nlm_void),
                .pc_xdrressize = St,
                .pc_name = "LOCK_RES",
@@ -638,6 +651,7 @@ const struct svc_procedure nlmsvc_procedures4[24] = {
                .pc_decode = nlm4svc_decode_void,
                .pc_encode = nlm4svc_encode_void,
                .pc_argsize = sizeof(struct nlm_res),
+               .pc_argzero = sizeof(struct nlm_res),
                .pc_ressize = sizeof(struct nlm_void),
                .pc_xdrressize = St,
                .pc_name = "CANCEL_RES",
@@ -647,6 +661,7 @@ const struct svc_procedure nlmsvc_procedures4[24] = {
                .pc_decode = nlm4svc_decode_void,
                .pc_encode = nlm4svc_encode_void,
                .pc_argsize = sizeof(struct nlm_res),
+               .pc_argzero = sizeof(struct nlm_res),
                .pc_ressize = sizeof(struct nlm_void),
                .pc_xdrressize = St,
                .pc_name = "UNLOCK_RES",
@@ -656,6 +671,7 @@ const struct svc_procedure nlmsvc_procedures4[24] = {
                .pc_decode = nlm4svc_decode_res,
                .pc_encode = nlm4svc_encode_void,
                .pc_argsize = sizeof(struct nlm_res),
+               .pc_argzero = sizeof(struct nlm_res),
                .pc_ressize = sizeof(struct nlm_void),
                .pc_xdrressize = St,
                .pc_name = "GRANTED_RES",
@@ -665,6 +681,7 @@ const struct svc_procedure nlmsvc_procedures4[24] = {
                .pc_decode = nlm4svc_decode_reboot,
                .pc_encode = nlm4svc_encode_void,
                .pc_argsize = sizeof(struct nlm_reboot),
+               .pc_argzero = sizeof(struct nlm_reboot),
                .pc_ressize = sizeof(struct nlm_void),
                .pc_xdrressize = St,
                .pc_name = "SM_NOTIFY",
@@ -674,6 +691,7 @@ const struct svc_procedure nlmsvc_procedures4[24] = {
                .pc_decode = nlm4svc_decode_void,
                .pc_encode = nlm4svc_encode_void,
                .pc_argsize = sizeof(struct nlm_void),
+               .pc_argzero = sizeof(struct nlm_void),
                .pc_ressize = sizeof(struct nlm_void),
                .pc_xdrressize = 0,
                .pc_name = "UNUSED",
@@ -683,6 +701,7 @@ const struct svc_procedure nlmsvc_procedures4[24] = {
                .pc_decode = nlm4svc_decode_void,
                .pc_encode = nlm4svc_encode_void,
                .pc_argsize = sizeof(struct nlm_void),
+               .pc_argzero = sizeof(struct nlm_void),
                .pc_ressize = sizeof(struct nlm_void),
                .pc_xdrressize = 0,
                .pc_name = "UNUSED",
@@ -692,6 +711,7 @@ const struct svc_procedure nlmsvc_procedures4[24] = {
                .pc_decode = nlm4svc_decode_void,
                .pc_encode = nlm4svc_encode_void,
                .pc_argsize = sizeof(struct nlm_void),
+               .pc_argzero = sizeof(struct nlm_void),
                .pc_ressize = sizeof(struct nlm_void),
                .pc_xdrressize = 0,
                .pc_name = "UNUSED",
@@ -701,6 +721,7 @@ const struct svc_procedure nlmsvc_procedures4[24] = {
                .pc_decode = nlm4svc_decode_shareargs,
                .pc_encode = nlm4svc_encode_shareres,
                .pc_argsize = sizeof(struct nlm_args),
+               .pc_argzero = sizeof(struct nlm_args),
                .pc_ressize = sizeof(struct nlm_res),
                .pc_xdrressize = Ck+St+1,
                .pc_name = "SHARE",
@@ -710,6 +731,7 @@ const struct svc_procedure nlmsvc_procedures4[24] = {
                .pc_decode = nlm4svc_decode_shareargs,
                .pc_encode = nlm4svc_encode_shareres,
                .pc_argsize = sizeof(struct nlm_args),
+               .pc_argzero = sizeof(struct nlm_args),
                .pc_ressize = sizeof(struct nlm_res),
                .pc_xdrressize = Ck+St+1,
                .pc_name = "UNSHARE",
@@ -719,6 +741,7 @@ const struct svc_procedure nlmsvc_procedures4[24] = {
                .pc_decode = nlm4svc_decode_lockargs,
                .pc_encode = nlm4svc_encode_res,
                .pc_argsize = sizeof(struct nlm_args),
+               .pc_argzero = sizeof(struct nlm_args),
                .pc_ressize = sizeof(struct nlm_res),
                .pc_xdrressize = Ck+St,
                .pc_name = "NM_LOCK",
@@ -728,6 +751,7 @@ const struct svc_procedure nlmsvc_procedures4[24] = {
                .pc_decode = nlm4svc_decode_notify,
                .pc_encode = nlm4svc_encode_void,
                .pc_argsize = sizeof(struct nlm_args),
+               .pc_argzero = sizeof(struct nlm_args),
                .pc_ressize = sizeof(struct nlm_void),
                .pc_xdrressize = St,
                .pc_name = "FREE_ALL",
index b09ca35b527cc006c57f4cd8d365d38f5f96e61a..e35c05e2780618bcf62504b79f41f8f12a4f292b 100644 (file)
@@ -555,6 +555,7 @@ const struct svc_procedure nlmsvc_procedures[24] = {
                .pc_decode = nlmsvc_decode_void,
                .pc_encode = nlmsvc_encode_void,
                .pc_argsize = sizeof(struct nlm_void),
+               .pc_argzero = sizeof(struct nlm_void),
                .pc_ressize = sizeof(struct nlm_void),
                .pc_xdrressize = St,
                .pc_name = "NULL",
@@ -564,6 +565,7 @@ const struct svc_procedure nlmsvc_procedures[24] = {
                .pc_decode = nlmsvc_decode_testargs,
                .pc_encode = nlmsvc_encode_testres,
                .pc_argsize = sizeof(struct nlm_args),
+               .pc_argzero = sizeof(struct nlm_args),
                .pc_ressize = sizeof(struct nlm_res),
                .pc_xdrressize = Ck+St+2+No+Rg,
                .pc_name = "TEST",
@@ -573,6 +575,7 @@ const struct svc_procedure nlmsvc_procedures[24] = {
                .pc_decode = nlmsvc_decode_lockargs,
                .pc_encode = nlmsvc_encode_res,
                .pc_argsize = sizeof(struct nlm_args),
+               .pc_argzero = sizeof(struct nlm_args),
                .pc_ressize = sizeof(struct nlm_res),
                .pc_xdrressize = Ck+St,
                .pc_name = "LOCK",
@@ -582,6 +585,7 @@ const struct svc_procedure nlmsvc_procedures[24] = {
                .pc_decode = nlmsvc_decode_cancargs,
                .pc_encode = nlmsvc_encode_res,
                .pc_argsize = sizeof(struct nlm_args),
+               .pc_argzero = sizeof(struct nlm_args),
                .pc_ressize = sizeof(struct nlm_res),
                .pc_xdrressize = Ck+St,
                .pc_name = "CANCEL",
@@ -591,6 +595,7 @@ const struct svc_procedure nlmsvc_procedures[24] = {
                .pc_decode = nlmsvc_decode_unlockargs,
                .pc_encode = nlmsvc_encode_res,
                .pc_argsize = sizeof(struct nlm_args),
+               .pc_argzero = sizeof(struct nlm_args),
                .pc_ressize = sizeof(struct nlm_res),
                .pc_xdrressize = Ck+St,
                .pc_name = "UNLOCK",
@@ -600,6 +605,7 @@ const struct svc_procedure nlmsvc_procedures[24] = {
                .pc_decode = nlmsvc_decode_testargs,
                .pc_encode = nlmsvc_encode_res,
                .pc_argsize = sizeof(struct nlm_args),
+               .pc_argzero = sizeof(struct nlm_args),
                .pc_ressize = sizeof(struct nlm_res),
                .pc_xdrressize = Ck+St,
                .pc_name = "GRANTED",
@@ -609,6 +615,7 @@ const struct svc_procedure nlmsvc_procedures[24] = {
                .pc_decode = nlmsvc_decode_testargs,
                .pc_encode = nlmsvc_encode_void,
                .pc_argsize = sizeof(struct nlm_args),
+               .pc_argzero = sizeof(struct nlm_args),
                .pc_ressize = sizeof(struct nlm_void),
                .pc_xdrressize = St,
                .pc_name = "TEST_MSG",
@@ -618,6 +625,7 @@ const struct svc_procedure nlmsvc_procedures[24] = {
                .pc_decode = nlmsvc_decode_lockargs,
                .pc_encode = nlmsvc_encode_void,
                .pc_argsize = sizeof(struct nlm_args),
+               .pc_argzero = sizeof(struct nlm_args),
                .pc_ressize = sizeof(struct nlm_void),
                .pc_xdrressize = St,
                .pc_name = "LOCK_MSG",
@@ -627,6 +635,7 @@ const struct svc_procedure nlmsvc_procedures[24] = {
                .pc_decode = nlmsvc_decode_cancargs,
                .pc_encode = nlmsvc_encode_void,
                .pc_argsize = sizeof(struct nlm_args),
+               .pc_argzero = sizeof(struct nlm_args),
                .pc_ressize = sizeof(struct nlm_void),
                .pc_xdrressize = St,
                .pc_name = "CANCEL_MSG",
@@ -636,6 +645,7 @@ const struct svc_procedure nlmsvc_procedures[24] = {
                .pc_decode = nlmsvc_decode_unlockargs,
                .pc_encode = nlmsvc_encode_void,
                .pc_argsize = sizeof(struct nlm_args),
+               .pc_argzero = sizeof(struct nlm_args),
                .pc_ressize = sizeof(struct nlm_void),
                .pc_xdrressize = St,
                .pc_name = "UNLOCK_MSG",
@@ -645,6 +655,7 @@ const struct svc_procedure nlmsvc_procedures[24] = {
                .pc_decode = nlmsvc_decode_testargs,
                .pc_encode = nlmsvc_encode_void,
                .pc_argsize = sizeof(struct nlm_args),
+               .pc_argzero = sizeof(struct nlm_args),
                .pc_ressize = sizeof(struct nlm_void),
                .pc_xdrressize = St,
                .pc_name = "GRANTED_MSG",
@@ -654,6 +665,7 @@ const struct svc_procedure nlmsvc_procedures[24] = {
                .pc_decode = nlmsvc_decode_void,
                .pc_encode = nlmsvc_encode_void,
                .pc_argsize = sizeof(struct nlm_res),
+               .pc_argzero = sizeof(struct nlm_res),
                .pc_ressize = sizeof(struct nlm_void),
                .pc_xdrressize = St,
                .pc_name = "TEST_RES",
@@ -663,6 +675,7 @@ const struct svc_procedure nlmsvc_procedures[24] = {
                .pc_decode = nlmsvc_decode_void,
                .pc_encode = nlmsvc_encode_void,
                .pc_argsize = sizeof(struct nlm_res),
+               .pc_argzero = sizeof(struct nlm_res),
                .pc_ressize = sizeof(struct nlm_void),
                .pc_xdrressize = St,
                .pc_name = "LOCK_RES",
@@ -672,6 +685,7 @@ const struct svc_procedure nlmsvc_procedures[24] = {
                .pc_decode = nlmsvc_decode_void,
                .pc_encode = nlmsvc_encode_void,
                .pc_argsize = sizeof(struct nlm_res),
+               .pc_argzero = sizeof(struct nlm_res),
                .pc_ressize = sizeof(struct nlm_void),
                .pc_xdrressize = St,
                .pc_name = "CANCEL_RES",
@@ -681,6 +695,7 @@ const struct svc_procedure nlmsvc_procedures[24] = {
                .pc_decode = nlmsvc_decode_void,
                .pc_encode = nlmsvc_encode_void,
                .pc_argsize = sizeof(struct nlm_res),
+               .pc_argzero = sizeof(struct nlm_res),
                .pc_ressize = sizeof(struct nlm_void),
                .pc_xdrressize = St,
                .pc_name = "UNLOCK_RES",
@@ -690,6 +705,7 @@ const struct svc_procedure nlmsvc_procedures[24] = {
                .pc_decode = nlmsvc_decode_res,
                .pc_encode = nlmsvc_encode_void,
                .pc_argsize = sizeof(struct nlm_res),
+               .pc_argzero = sizeof(struct nlm_res),
                .pc_ressize = sizeof(struct nlm_void),
                .pc_xdrressize = St,
                .pc_name = "GRANTED_RES",
@@ -699,6 +715,7 @@ const struct svc_procedure nlmsvc_procedures[24] = {
                .pc_decode = nlmsvc_decode_reboot,
                .pc_encode = nlmsvc_encode_void,
                .pc_argsize = sizeof(struct nlm_reboot),
+               .pc_argzero = sizeof(struct nlm_reboot),
                .pc_ressize = sizeof(struct nlm_void),
                .pc_xdrressize = St,
                .pc_name = "SM_NOTIFY",
@@ -708,6 +725,7 @@ const struct svc_procedure nlmsvc_procedures[24] = {
                .pc_decode = nlmsvc_decode_void,
                .pc_encode = nlmsvc_encode_void,
                .pc_argsize = sizeof(struct nlm_void),
+               .pc_argzero = sizeof(struct nlm_void),
                .pc_ressize = sizeof(struct nlm_void),
                .pc_xdrressize = St,
                .pc_name = "UNUSED",
@@ -717,6 +735,7 @@ const struct svc_procedure nlmsvc_procedures[24] = {
                .pc_decode = nlmsvc_decode_void,
                .pc_encode = nlmsvc_encode_void,
                .pc_argsize = sizeof(struct nlm_void),
+               .pc_argzero = sizeof(struct nlm_void),
                .pc_ressize = sizeof(struct nlm_void),
                .pc_xdrressize = St,
                .pc_name = "UNUSED",
@@ -726,6 +745,7 @@ const struct svc_procedure nlmsvc_procedures[24] = {
                .pc_decode = nlmsvc_decode_void,
                .pc_encode = nlmsvc_encode_void,
                .pc_argsize = sizeof(struct nlm_void),
+               .pc_argzero = sizeof(struct nlm_void),
                .pc_ressize = sizeof(struct nlm_void),
                .pc_xdrressize = St,
                .pc_name = "UNUSED",
@@ -735,6 +755,7 @@ const struct svc_procedure nlmsvc_procedures[24] = {
                .pc_decode = nlmsvc_decode_shareargs,
                .pc_encode = nlmsvc_encode_shareres,
                .pc_argsize = sizeof(struct nlm_args),
+               .pc_argzero = sizeof(struct nlm_args),
                .pc_ressize = sizeof(struct nlm_res),
                .pc_xdrressize = Ck+St+1,
                .pc_name = "SHARE",
@@ -744,6 +765,7 @@ const struct svc_procedure nlmsvc_procedures[24] = {
                .pc_decode = nlmsvc_decode_shareargs,
                .pc_encode = nlmsvc_encode_shareres,
                .pc_argsize = sizeof(struct nlm_args),
+               .pc_argzero = sizeof(struct nlm_args),
                .pc_ressize = sizeof(struct nlm_res),
                .pc_xdrressize = Ck+St+1,
                .pc_name = "UNSHARE",
@@ -753,6 +775,7 @@ const struct svc_procedure nlmsvc_procedures[24] = {
                .pc_decode = nlmsvc_decode_lockargs,
                .pc_encode = nlmsvc_encode_res,
                .pc_argsize = sizeof(struct nlm_args),
+               .pc_argzero = sizeof(struct nlm_args),
                .pc_ressize = sizeof(struct nlm_res),
                .pc_xdrressize = Ck+St,
                .pc_name = "NM_LOCK",
@@ -762,6 +785,7 @@ const struct svc_procedure nlmsvc_procedures[24] = {
                .pc_decode = nlmsvc_decode_notify,
                .pc_encode = nlmsvc_encode_void,
                .pc_argsize = sizeof(struct nlm_args),
+               .pc_argzero = sizeof(struct nlm_args),
                .pc_ressize = sizeof(struct nlm_void),
                .pc_xdrressize = 0,
                .pc_name = "FREE_ALL",
index 8dcb08e1a885d623f82427cc3bc261949c043957..d0cccddb7d0885fe98f477324fdd50012faf3cb7 100644 (file)
@@ -1065,6 +1065,7 @@ static const struct svc_procedure nfs4_callback_procedures1[] = {
                .pc_func = nfs4_callback_compound,
                .pc_encode = nfs4_encode_void,
                .pc_argsize = 256,
+               .pc_argzero = 256,
                .pc_ressize = 256,
                .pc_xdrressize = NFS4_CALLBACK_BUFSIZE,
                .pc_name = "COMPOUND",
index 9edd3c1a30fb10c14676eda869e9db94e9234804..13e6e6897f6cf332888f44648fc99781ad35fd30 100644 (file)
@@ -331,6 +331,7 @@ static const struct svc_procedure nfsd_acl_procedures2[5] = {
                .pc_decode = nfssvc_decode_voidarg,
                .pc_encode = nfssvc_encode_voidres,
                .pc_argsize = sizeof(struct nfsd_voidargs),
+               .pc_argzero = sizeof(struct nfsd_voidargs),
                .pc_ressize = sizeof(struct nfsd_voidres),
                .pc_cachetype = RC_NOCACHE,
                .pc_xdrressize = ST,
@@ -342,6 +343,7 @@ static const struct svc_procedure nfsd_acl_procedures2[5] = {
                .pc_encode = nfsaclsvc_encode_getaclres,
                .pc_release = nfsaclsvc_release_getacl,
                .pc_argsize = sizeof(struct nfsd3_getaclargs),
+               .pc_argzero = sizeof(struct nfsd3_getaclargs),
                .pc_ressize = sizeof(struct nfsd3_getaclres),
                .pc_cachetype = RC_NOCACHE,
                .pc_xdrressize = ST+1+2*(1+ACL),
@@ -353,6 +355,7 @@ static const struct svc_procedure nfsd_acl_procedures2[5] = {
                .pc_encode = nfssvc_encode_attrstatres,
                .pc_release = nfssvc_release_attrstat,
                .pc_argsize = sizeof(struct nfsd3_setaclargs),
+               .pc_argzero = sizeof(struct nfsd3_setaclargs),
                .pc_ressize = sizeof(struct nfsd_attrstat),
                .pc_cachetype = RC_NOCACHE,
                .pc_xdrressize = ST+AT,
@@ -364,6 +367,7 @@ static const struct svc_procedure nfsd_acl_procedures2[5] = {
                .pc_encode = nfssvc_encode_attrstatres,
                .pc_release = nfssvc_release_attrstat,
                .pc_argsize = sizeof(struct nfsd_fhandle),
+               .pc_argzero = sizeof(struct nfsd_fhandle),
                .pc_ressize = sizeof(struct nfsd_attrstat),
                .pc_cachetype = RC_NOCACHE,
                .pc_xdrressize = ST+AT,
@@ -375,6 +379,7 @@ static const struct svc_procedure nfsd_acl_procedures2[5] = {
                .pc_encode = nfsaclsvc_encode_accessres,
                .pc_release = nfsaclsvc_release_access,
                .pc_argsize = sizeof(struct nfsd3_accessargs),
+               .pc_argzero = sizeof(struct nfsd3_accessargs),
                .pc_ressize = sizeof(struct nfsd3_accessres),
                .pc_cachetype = RC_NOCACHE,
                .pc_xdrressize = ST+AT+1,
index 9446c67436649cebfbdca11ea82820b3586c0c13..2fb9ee3564558e11205f34593de438f40824896a 100644 (file)
@@ -252,6 +252,7 @@ static const struct svc_procedure nfsd_acl_procedures3[3] = {
                .pc_decode = nfssvc_decode_voidarg,
                .pc_encode = nfssvc_encode_voidres,
                .pc_argsize = sizeof(struct nfsd_voidargs),
+               .pc_argzero = sizeof(struct nfsd_voidargs),
                .pc_ressize = sizeof(struct nfsd_voidres),
                .pc_cachetype = RC_NOCACHE,
                .pc_xdrressize = ST,
@@ -263,6 +264,7 @@ static const struct svc_procedure nfsd_acl_procedures3[3] = {
                .pc_encode = nfs3svc_encode_getaclres,
                .pc_release = nfs3svc_release_getacl,
                .pc_argsize = sizeof(struct nfsd3_getaclargs),
+               .pc_argzero = sizeof(struct nfsd3_getaclargs),
                .pc_ressize = sizeof(struct nfsd3_getaclres),
                .pc_cachetype = RC_NOCACHE,
                .pc_xdrressize = ST+1+2*(1+ACL),
@@ -274,6 +276,7 @@ static const struct svc_procedure nfsd_acl_procedures3[3] = {
                .pc_encode = nfs3svc_encode_setaclres,
                .pc_release = nfs3svc_release_fhandle,
                .pc_argsize = sizeof(struct nfsd3_setaclargs),
+               .pc_argzero = sizeof(struct nfsd3_setaclargs),
                .pc_ressize = sizeof(struct nfsd3_attrstat),
                .pc_cachetype = RC_NOCACHE,
                .pc_xdrressize = ST+pAT,
index 5b1e771238b352f0724249f360431b6352f597c3..58695e4e18b46eadea56537cc01900ab457ed0d5 100644 (file)
@@ -809,6 +809,7 @@ static const struct svc_procedure nfsd_procedures3[22] = {
                .pc_decode = nfssvc_decode_voidarg,
                .pc_encode = nfssvc_encode_voidres,
                .pc_argsize = sizeof(struct nfsd_voidargs),
+               .pc_argzero = sizeof(struct nfsd_voidargs),
                .pc_ressize = sizeof(struct nfsd_voidres),
                .pc_cachetype = RC_NOCACHE,
                .pc_xdrressize = ST,
@@ -820,6 +821,7 @@ static const struct svc_procedure nfsd_procedures3[22] = {
                .pc_encode = nfs3svc_encode_getattrres,
                .pc_release = nfs3svc_release_fhandle,
                .pc_argsize = sizeof(struct nfsd_fhandle),
+               .pc_argzero = sizeof(struct nfsd_fhandle),
                .pc_ressize = sizeof(struct nfsd3_attrstatres),
                .pc_cachetype = RC_NOCACHE,
                .pc_xdrressize = ST+AT,
@@ -831,6 +833,7 @@ static const struct svc_procedure nfsd_procedures3[22] = {
                .pc_encode = nfs3svc_encode_wccstatres,
                .pc_release = nfs3svc_release_fhandle,
                .pc_argsize = sizeof(struct nfsd3_sattrargs),
+               .pc_argzero = sizeof(struct nfsd3_sattrargs),
                .pc_ressize = sizeof(struct nfsd3_wccstatres),
                .pc_cachetype = RC_REPLBUFF,
                .pc_xdrressize = ST+WC,
@@ -842,6 +845,7 @@ static const struct svc_procedure nfsd_procedures3[22] = {
                .pc_encode = nfs3svc_encode_lookupres,
                .pc_release = nfs3svc_release_fhandle2,
                .pc_argsize = sizeof(struct nfsd3_diropargs),
+               .pc_argzero = sizeof(struct nfsd3_diropargs),
                .pc_ressize = sizeof(struct nfsd3_diropres),
                .pc_cachetype = RC_NOCACHE,
                .pc_xdrressize = ST+FH+pAT+pAT,
@@ -853,6 +857,7 @@ static const struct svc_procedure nfsd_procedures3[22] = {
                .pc_encode = nfs3svc_encode_accessres,
                .pc_release = nfs3svc_release_fhandle,
                .pc_argsize = sizeof(struct nfsd3_accessargs),
+               .pc_argzero = sizeof(struct nfsd3_accessargs),
                .pc_ressize = sizeof(struct nfsd3_accessres),
                .pc_cachetype = RC_NOCACHE,
                .pc_xdrressize = ST+pAT+1,
@@ -864,6 +869,7 @@ static const struct svc_procedure nfsd_procedures3[22] = {
                .pc_encode = nfs3svc_encode_readlinkres,
                .pc_release = nfs3svc_release_fhandle,
                .pc_argsize = sizeof(struct nfsd_fhandle),
+               .pc_argzero = sizeof(struct nfsd_fhandle),
                .pc_ressize = sizeof(struct nfsd3_readlinkres),
                .pc_cachetype = RC_NOCACHE,
                .pc_xdrressize = ST+pAT+1+NFS3_MAXPATHLEN/4,
@@ -875,6 +881,7 @@ static const struct svc_procedure nfsd_procedures3[22] = {
                .pc_encode = nfs3svc_encode_readres,
                .pc_release = nfs3svc_release_fhandle,
                .pc_argsize = sizeof(struct nfsd3_readargs),
+               .pc_argzero = sizeof(struct nfsd3_readargs),
                .pc_ressize = sizeof(struct nfsd3_readres),
                .pc_cachetype = RC_NOCACHE,
                .pc_xdrressize = ST+pAT+4+NFSSVC_MAXBLKSIZE/4,
@@ -886,6 +893,7 @@ static const struct svc_procedure nfsd_procedures3[22] = {
                .pc_encode = nfs3svc_encode_writeres,
                .pc_release = nfs3svc_release_fhandle,
                .pc_argsize = sizeof(struct nfsd3_writeargs),
+               .pc_argzero = sizeof(struct nfsd3_writeargs),
                .pc_ressize = sizeof(struct nfsd3_writeres),
                .pc_cachetype = RC_REPLBUFF,
                .pc_xdrressize = ST+WC+4,
@@ -897,6 +905,7 @@ static const struct svc_procedure nfsd_procedures3[22] = {
                .pc_encode = nfs3svc_encode_createres,
                .pc_release = nfs3svc_release_fhandle2,
                .pc_argsize = sizeof(struct nfsd3_createargs),
+               .pc_argzero = sizeof(struct nfsd3_createargs),
                .pc_ressize = sizeof(struct nfsd3_createres),
                .pc_cachetype = RC_REPLBUFF,
                .pc_xdrressize = ST+(1+FH+pAT)+WC,
@@ -908,6 +917,7 @@ static const struct svc_procedure nfsd_procedures3[22] = {
                .pc_encode = nfs3svc_encode_createres,
                .pc_release = nfs3svc_release_fhandle2,
                .pc_argsize = sizeof(struct nfsd3_mkdirargs),
+               .pc_argzero = sizeof(struct nfsd3_mkdirargs),
                .pc_ressize = sizeof(struct nfsd3_createres),
                .pc_cachetype = RC_REPLBUFF,
                .pc_xdrressize = ST+(1+FH+pAT)+WC,
@@ -919,6 +929,7 @@ static const struct svc_procedure nfsd_procedures3[22] = {
                .pc_encode = nfs3svc_encode_createres,
                .pc_release = nfs3svc_release_fhandle2,
                .pc_argsize = sizeof(struct nfsd3_symlinkargs),
+               .pc_argzero = sizeof(struct nfsd3_symlinkargs),
                .pc_ressize = sizeof(struct nfsd3_createres),
                .pc_cachetype = RC_REPLBUFF,
                .pc_xdrressize = ST+(1+FH+pAT)+WC,
@@ -930,6 +941,7 @@ static const struct svc_procedure nfsd_procedures3[22] = {
                .pc_encode = nfs3svc_encode_createres,
                .pc_release = nfs3svc_release_fhandle2,
                .pc_argsize = sizeof(struct nfsd3_mknodargs),
+               .pc_argzero = sizeof(struct nfsd3_mknodargs),
                .pc_ressize = sizeof(struct nfsd3_createres),
                .pc_cachetype = RC_REPLBUFF,
                .pc_xdrressize = ST+(1+FH+pAT)+WC,
@@ -941,6 +953,7 @@ static const struct svc_procedure nfsd_procedures3[22] = {
                .pc_encode = nfs3svc_encode_wccstatres,
                .pc_release = nfs3svc_release_fhandle,
                .pc_argsize = sizeof(struct nfsd3_diropargs),
+               .pc_argzero = sizeof(struct nfsd3_diropargs),
                .pc_ressize = sizeof(struct nfsd3_wccstatres),
                .pc_cachetype = RC_REPLBUFF,
                .pc_xdrressize = ST+WC,
@@ -952,6 +965,7 @@ static const struct svc_procedure nfsd_procedures3[22] = {
                .pc_encode = nfs3svc_encode_wccstatres,
                .pc_release = nfs3svc_release_fhandle,
                .pc_argsize = sizeof(struct nfsd3_diropargs),
+               .pc_argzero = sizeof(struct nfsd3_diropargs),
                .pc_ressize = sizeof(struct nfsd3_wccstatres),
                .pc_cachetype = RC_REPLBUFF,
                .pc_xdrressize = ST+WC,
@@ -963,6 +977,7 @@ static const struct svc_procedure nfsd_procedures3[22] = {
                .pc_encode = nfs3svc_encode_renameres,
                .pc_release = nfs3svc_release_fhandle2,
                .pc_argsize = sizeof(struct nfsd3_renameargs),
+               .pc_argzero = sizeof(struct nfsd3_renameargs),
                .pc_ressize = sizeof(struct nfsd3_renameres),
                .pc_cachetype = RC_REPLBUFF,
                .pc_xdrressize = ST+WC+WC,
@@ -974,6 +989,7 @@ static const struct svc_procedure nfsd_procedures3[22] = {
                .pc_encode = nfs3svc_encode_linkres,
                .pc_release = nfs3svc_release_fhandle2,
                .pc_argsize = sizeof(struct nfsd3_linkargs),
+               .pc_argzero = sizeof(struct nfsd3_linkargs),
                .pc_ressize = sizeof(struct nfsd3_linkres),
                .pc_cachetype = RC_REPLBUFF,
                .pc_xdrressize = ST+pAT+WC,
@@ -985,6 +1001,7 @@ static const struct svc_procedure nfsd_procedures3[22] = {
                .pc_encode = nfs3svc_encode_readdirres,
                .pc_release = nfs3svc_release_fhandle,
                .pc_argsize = sizeof(struct nfsd3_readdirargs),
+               .pc_argzero = sizeof(struct nfsd3_readdirargs),
                .pc_ressize = sizeof(struct nfsd3_readdirres),
                .pc_cachetype = RC_NOCACHE,
                .pc_name = "READDIR",
@@ -995,6 +1012,7 @@ static const struct svc_procedure nfsd_procedures3[22] = {
                .pc_encode = nfs3svc_encode_readdirres,
                .pc_release = nfs3svc_release_fhandle,
                .pc_argsize = sizeof(struct nfsd3_readdirplusargs),
+               .pc_argzero = sizeof(struct nfsd3_readdirplusargs),
                .pc_ressize = sizeof(struct nfsd3_readdirres),
                .pc_cachetype = RC_NOCACHE,
                .pc_name = "READDIRPLUS",
@@ -1004,6 +1022,7 @@ static const struct svc_procedure nfsd_procedures3[22] = {
                .pc_decode = nfs3svc_decode_fhandleargs,
                .pc_encode = nfs3svc_encode_fsstatres,
                .pc_argsize = sizeof(struct nfsd3_fhandleargs),
+               .pc_argzero = sizeof(struct nfsd3_fhandleargs),
                .pc_ressize = sizeof(struct nfsd3_fsstatres),
                .pc_cachetype = RC_NOCACHE,
                .pc_xdrressize = ST+pAT+2*6+1,
@@ -1014,6 +1033,7 @@ static const struct svc_procedure nfsd_procedures3[22] = {
                .pc_decode = nfs3svc_decode_fhandleargs,
                .pc_encode = nfs3svc_encode_fsinfores,
                .pc_argsize = sizeof(struct nfsd3_fhandleargs),
+               .pc_argzero = sizeof(struct nfsd3_fhandleargs),
                .pc_ressize = sizeof(struct nfsd3_fsinfores),
                .pc_cachetype = RC_NOCACHE,
                .pc_xdrressize = ST+pAT+12,
@@ -1024,6 +1044,7 @@ static const struct svc_procedure nfsd_procedures3[22] = {
                .pc_decode = nfs3svc_decode_fhandleargs,
                .pc_encode = nfs3svc_encode_pathconfres,
                .pc_argsize = sizeof(struct nfsd3_fhandleargs),
+               .pc_argzero = sizeof(struct nfsd3_fhandleargs),
                .pc_ressize = sizeof(struct nfsd3_pathconfres),
                .pc_cachetype = RC_NOCACHE,
                .pc_xdrressize = ST+pAT+6,
@@ -1035,6 +1056,7 @@ static const struct svc_procedure nfsd_procedures3[22] = {
                .pc_encode = nfs3svc_encode_commitres,
                .pc_release = nfs3svc_release_fhandle,
                .pc_argsize = sizeof(struct nfsd3_commitargs),
+               .pc_argzero = sizeof(struct nfsd3_commitargs),
                .pc_ressize = sizeof(struct nfsd3_commitres),
                .pc_cachetype = RC_NOCACHE,
                .pc_xdrressize = ST+WC+2,
index 1918c9ec347836f3e11349bc0595cb6b0cb1a44a..66a99827c7aa624572bb6d374c1796d50694c59a 100644 (file)
@@ -3585,6 +3585,7 @@ static const struct svc_procedure nfsd_procedures4[2] = {
                .pc_decode = nfssvc_decode_voidarg,
                .pc_encode = nfssvc_encode_voidres,
                .pc_argsize = sizeof(struct nfsd_voidargs),
+               .pc_argzero = sizeof(struct nfsd_voidargs),
                .pc_ressize = sizeof(struct nfsd_voidres),
                .pc_cachetype = RC_NOCACHE,
                .pc_xdrressize = 1,
@@ -3595,6 +3596,7 @@ static const struct svc_procedure nfsd_procedures4[2] = {
                .pc_decode = nfs4svc_decode_compoundargs,
                .pc_encode = nfs4svc_encode_compoundres,
                .pc_argsize = sizeof(struct nfsd4_compoundargs),
+               .pc_argzero = sizeof(struct nfsd4_compoundargs),
                .pc_ressize = sizeof(struct nfsd4_compoundres),
                .pc_release = nfsd4_release_compoundargs,
                .pc_cachetype = RC_NOCACHE,
index ee02ede74bf53d6a5d853339d2eef47a84f1335c..49778ff410e32a8424e9a780afdb1d8c98d7bcad 100644 (file)
@@ -645,6 +645,7 @@ static const struct svc_procedure nfsd_procedures2[18] = {
                .pc_decode = nfssvc_decode_voidarg,
                .pc_encode = nfssvc_encode_voidres,
                .pc_argsize = sizeof(struct nfsd_voidargs),
+               .pc_argzero = sizeof(struct nfsd_voidargs),
                .pc_ressize = sizeof(struct nfsd_voidres),
                .pc_cachetype = RC_NOCACHE,
                .pc_xdrressize = 0,
@@ -656,6 +657,7 @@ static const struct svc_procedure nfsd_procedures2[18] = {
                .pc_encode = nfssvc_encode_attrstatres,
                .pc_release = nfssvc_release_attrstat,
                .pc_argsize = sizeof(struct nfsd_fhandle),
+               .pc_argzero = sizeof(struct nfsd_fhandle),
                .pc_ressize = sizeof(struct nfsd_attrstat),
                .pc_cachetype = RC_NOCACHE,
                .pc_xdrressize = ST+AT,
@@ -667,6 +669,7 @@ static const struct svc_procedure nfsd_procedures2[18] = {
                .pc_encode = nfssvc_encode_attrstatres,
                .pc_release = nfssvc_release_attrstat,
                .pc_argsize = sizeof(struct nfsd_sattrargs),
+               .pc_argzero = sizeof(struct nfsd_sattrargs),
                .pc_ressize = sizeof(struct nfsd_attrstat),
                .pc_cachetype = RC_REPLBUFF,
                .pc_xdrressize = ST+AT,
@@ -677,6 +680,7 @@ static const struct svc_procedure nfsd_procedures2[18] = {
                .pc_decode = nfssvc_decode_voidarg,
                .pc_encode = nfssvc_encode_voidres,
                .pc_argsize = sizeof(struct nfsd_voidargs),
+               .pc_argzero = sizeof(struct nfsd_voidargs),
                .pc_ressize = sizeof(struct nfsd_voidres),
                .pc_cachetype = RC_NOCACHE,
                .pc_xdrressize = 0,
@@ -688,6 +692,7 @@ static const struct svc_procedure nfsd_procedures2[18] = {
                .pc_encode = nfssvc_encode_diropres,
                .pc_release = nfssvc_release_diropres,
                .pc_argsize = sizeof(struct nfsd_diropargs),
+               .pc_argzero = sizeof(struct nfsd_diropargs),
                .pc_ressize = sizeof(struct nfsd_diropres),
                .pc_cachetype = RC_NOCACHE,
                .pc_xdrressize = ST+FH+AT,
@@ -698,6 +703,7 @@ static const struct svc_procedure nfsd_procedures2[18] = {
                .pc_decode = nfssvc_decode_fhandleargs,
                .pc_encode = nfssvc_encode_readlinkres,
                .pc_argsize = sizeof(struct nfsd_fhandle),
+               .pc_argzero = sizeof(struct nfsd_fhandle),
                .pc_ressize = sizeof(struct nfsd_readlinkres),
                .pc_cachetype = RC_NOCACHE,
                .pc_xdrressize = ST+1+NFS_MAXPATHLEN/4,
@@ -709,6 +715,7 @@ static const struct svc_procedure nfsd_procedures2[18] = {
                .pc_encode = nfssvc_encode_readres,
                .pc_release = nfssvc_release_readres,
                .pc_argsize = sizeof(struct nfsd_readargs),
+               .pc_argzero = sizeof(struct nfsd_readargs),
                .pc_ressize = sizeof(struct nfsd_readres),
                .pc_cachetype = RC_NOCACHE,
                .pc_xdrressize = ST+AT+1+NFSSVC_MAXBLKSIZE_V2/4,
@@ -719,6 +726,7 @@ static const struct svc_procedure nfsd_procedures2[18] = {
                .pc_decode = nfssvc_decode_voidarg,
                .pc_encode = nfssvc_encode_voidres,
                .pc_argsize = sizeof(struct nfsd_voidargs),
+               .pc_argzero = sizeof(struct nfsd_voidargs),
                .pc_ressize = sizeof(struct nfsd_voidres),
                .pc_cachetype = RC_NOCACHE,
                .pc_xdrressize = 0,
@@ -730,6 +738,7 @@ static const struct svc_procedure nfsd_procedures2[18] = {
                .pc_encode = nfssvc_encode_attrstatres,
                .pc_release = nfssvc_release_attrstat,
                .pc_argsize = sizeof(struct nfsd_writeargs),
+               .pc_argzero = sizeof(struct nfsd_writeargs),
                .pc_ressize = sizeof(struct nfsd_attrstat),
                .pc_cachetype = RC_REPLBUFF,
                .pc_xdrressize = ST+AT,
@@ -741,6 +750,7 @@ static const struct svc_procedure nfsd_procedures2[18] = {
                .pc_encode = nfssvc_encode_diropres,
                .pc_release = nfssvc_release_diropres,
                .pc_argsize = sizeof(struct nfsd_createargs),
+               .pc_argzero = sizeof(struct nfsd_createargs),
                .pc_ressize = sizeof(struct nfsd_diropres),
                .pc_cachetype = RC_REPLBUFF,
                .pc_xdrressize = ST+FH+AT,
@@ -751,6 +761,7 @@ static const struct svc_procedure nfsd_procedures2[18] = {
                .pc_decode = nfssvc_decode_diropargs,
                .pc_encode = nfssvc_encode_statres,
                .pc_argsize = sizeof(struct nfsd_diropargs),
+               .pc_argzero = sizeof(struct nfsd_diropargs),
                .pc_ressize = sizeof(struct nfsd_stat),
                .pc_cachetype = RC_REPLSTAT,
                .pc_xdrressize = ST,
@@ -761,6 +772,7 @@ static const struct svc_procedure nfsd_procedures2[18] = {
                .pc_decode = nfssvc_decode_renameargs,
                .pc_encode = nfssvc_encode_statres,
                .pc_argsize = sizeof(struct nfsd_renameargs),
+               .pc_argzero = sizeof(struct nfsd_renameargs),
                .pc_ressize = sizeof(struct nfsd_stat),
                .pc_cachetype = RC_REPLSTAT,
                .pc_xdrressize = ST,
@@ -771,6 +783,7 @@ static const struct svc_procedure nfsd_procedures2[18] = {
                .pc_decode = nfssvc_decode_linkargs,
                .pc_encode = nfssvc_encode_statres,
                .pc_argsize = sizeof(struct nfsd_linkargs),
+               .pc_argzero = sizeof(struct nfsd_linkargs),
                .pc_ressize = sizeof(struct nfsd_stat),
                .pc_cachetype = RC_REPLSTAT,
                .pc_xdrressize = ST,
@@ -781,6 +794,7 @@ static const struct svc_procedure nfsd_procedures2[18] = {
                .pc_decode = nfssvc_decode_symlinkargs,
                .pc_encode = nfssvc_encode_statres,
                .pc_argsize = sizeof(struct nfsd_symlinkargs),
+               .pc_argzero = sizeof(struct nfsd_symlinkargs),
                .pc_ressize = sizeof(struct nfsd_stat),
                .pc_cachetype = RC_REPLSTAT,
                .pc_xdrressize = ST,
@@ -792,6 +806,7 @@ static const struct svc_procedure nfsd_procedures2[18] = {
                .pc_encode = nfssvc_encode_diropres,
                .pc_release = nfssvc_release_diropres,
                .pc_argsize = sizeof(struct nfsd_createargs),
+               .pc_argzero = sizeof(struct nfsd_createargs),
                .pc_ressize = sizeof(struct nfsd_diropres),
                .pc_cachetype = RC_REPLBUFF,
                .pc_xdrressize = ST+FH+AT,
@@ -802,6 +817,7 @@ static const struct svc_procedure nfsd_procedures2[18] = {
                .pc_decode = nfssvc_decode_diropargs,
                .pc_encode = nfssvc_encode_statres,
                .pc_argsize = sizeof(struct nfsd_diropargs),
+               .pc_argzero = sizeof(struct nfsd_diropargs),
                .pc_ressize = sizeof(struct nfsd_stat),
                .pc_cachetype = RC_REPLSTAT,
                .pc_xdrressize = ST,
@@ -812,6 +828,7 @@ static const struct svc_procedure nfsd_procedures2[18] = {
                .pc_decode = nfssvc_decode_readdirargs,
                .pc_encode = nfssvc_encode_readdirres,
                .pc_argsize = sizeof(struct nfsd_readdirargs),
+               .pc_argzero = sizeof(struct nfsd_readdirargs),
                .pc_ressize = sizeof(struct nfsd_readdirres),
                .pc_cachetype = RC_NOCACHE,
                .pc_name = "READDIR",
@@ -821,6 +838,7 @@ static const struct svc_procedure nfsd_procedures2[18] = {
                .pc_decode = nfssvc_decode_fhandleargs,
                .pc_encode = nfssvc_encode_statfsres,
                .pc_argsize = sizeof(struct nfsd_fhandle),
+               .pc_argzero = sizeof(struct nfsd_fhandle),
                .pc_ressize = sizeof(struct nfsd_statfsres),
                .pc_cachetype = RC_NOCACHE,
                .pc_xdrressize = ST+5,
index 0ca8a8ffb47e4a0acfea9e27d5e2595a30085fa4..88de45491376a6c236363becd0770c25a36a3de7 100644 (file)
@@ -472,6 +472,7 @@ struct svc_procedure {
        /* XDR free result: */
        void                    (*pc_release)(struct svc_rqst *);
        unsigned int            pc_argsize;     /* argument struct size */
+       unsigned int            pc_argzero;     /* how much of argument to clear */
        unsigned int            pc_ressize;     /* result struct size */
        unsigned int            pc_cachetype;   /* cache info (NFS) */
        unsigned int            pc_xdrressize;  /* maximum size of XDR reply */
index 4268145490a4f7e758f750fa5c40683615bca77d..32a537f852fec2c9e2bdb7ebca33b44f86707adb 100644 (file)
@@ -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 */