summaryrefslogtreecommitdiff
path: root/fs/lockd
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2026-05-12 14:14:00 -0400
committerChuck Lever <cel@kernel.org>2026-06-09 16:32:59 -0400
commit386bed664e0d20e60908bc51d33994bf6c1a05a0 (patch)
tree544f68a503978024a13d66fabe163140bd0428b1 /fs/lockd
parent6c534ad999b6696bca55ded82bb7645fe6c5979e (diff)
downloadlinux-next-386bed664e0d20e60908bc51d33994bf6c1a05a0.tar.gz
linux-next-386bed664e0d20e60908bc51d33994bf6c1a05a0.zip
lockd: Use xdrgen XDR functions for the NLMv3 TEST_RES procedure
Continue the xdrgen migration by converting NLMv3 TEST_RES, the callback that a remote NLM uses to return async TEST results to this lockd. The procedure now uses nlm_svc_decode_nlm_testres and nlm_svc_encode_void, generated from the NLM version 3 protocol specification. Setting pc_argzero to zero is safe because the generated decoder fills the argp->xdrgen subfields before the procedure runs, so the zeroing memset performed by the dispatch layer is no longer needed. Setting pc_xdrressize to XDR_void reflects that TEST_RES, as a callback, returns no data; the previous value of St over-reserved a status word in the reply buffer. Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'fs/lockd')
-rw-r--r--fs/lockd/svcproc.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/fs/lockd/svcproc.c b/fs/lockd/svcproc.c
index 21a363450d59..ed1164ff431a 100644
--- a/fs/lockd/svcproc.c
+++ b/fs/lockd/svcproc.c
@@ -1270,15 +1270,15 @@ static const struct svc_procedure nlmsvc_procedures[24] = {
.pc_xdrressize = XDR_void,
.pc_name = "GRANTED_MSG",
},
- [NLMPROC_TEST_RES] = {
- .pc_func = nlmsvc_proc_null,
- .pc_decode = nlmsvc_decode_void,
- .pc_encode = nlmsvc_encode_void,
- .pc_argsize = sizeof(struct lockd_res),
- .pc_argzero = sizeof(struct lockd_res),
- .pc_ressize = sizeof(struct nlm_void),
- .pc_xdrressize = St,
- .pc_name = "TEST_RES",
+ [NLM_TEST_RES] = {
+ .pc_func = nlmsvc_proc_null,
+ .pc_decode = nlm_svc_decode_nlm_testres,
+ .pc_encode = nlm_svc_encode_void,
+ .pc_argsize = sizeof(struct nlm_testres),
+ .pc_argzero = 0,
+ .pc_ressize = 0,
+ .pc_xdrressize = XDR_void,
+ .pc_name = "TEST_RES",
},
[NLMPROC_LOCK_RES] = {
.pc_func = nlmsvc_proc_null,