]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
lockd: Use xdrgen XDR functions for the NLMv4 FREE_ALL procedure
authorChuck Lever <chuck.lever@oracle.com>
Tue, 17 Feb 2026 22:07:18 +0000 (17:07 -0500)
committerChuck Lever <chuck.lever@oracle.com>
Mon, 30 Mar 2026 01:25:09 +0000 (21:25 -0400)
commitb201ce7af2a28d8d6c43a3b5bd099a44f98c1c3e
treed744ad317e23b4647dd57d9e65d44c80fd12e66d
parenteedae4430122c5799f3d33bbd26dcbafc7d02cd1
lockd: Use xdrgen XDR functions for the NLMv4 FREE_ALL procedure

With all other NLMv4 procedures now converted to xdrgen-generated
XDR functions, the FREE_ALL procedure can be converted as well.
This conversion allows the removal of nlm4svc_retrieve_args(),
a 79-line helper function that was used only by FREE_ALL to
retrieve client information from lockd's internal data
structures.

Replace the NLMPROC4_FREE_ALL entry in the nlm_procedures4
array with an entry that uses xdrgen-built XDR decoders and
encoders. The procedure handler is updated to use the new
wrapper structure (nlm4_notify_wrapper) and call
nlm4svc_lookup_host() directly, eliminating the need for the
now-removed helper function.

The .pc_argzero field is set to zero because xdrgen decoders
fully initialize all fields in argp->xdrgen, making the early
defensive memset unnecessary. The remaining argp fields that
fall outside the xdrgen structures are cleared explicitly as
needed.

Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
fs/lockd/svc4proc.c