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

Now that the share helpers have been decoupled from the
NLMv3-specific struct nlm_args and file_lock initialization
has been hoisted into the procedure handler, the NLMv4 UNSHARE
procedure can be converted to use xdrgen-generated XDR
functions.

Replace the NLMPROC4_UNSHARE 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 structures (nlm4_shareargs_wrapper and
nlm4_shareres_wrapper) and access arguments through the
argp->xdrgen hierarchy.

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