]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
lockd: Hoist file_lock init out of nlm4svc_decode_shareargs()
authorChuck Lever <chuck.lever@oracle.com>
Tue, 17 Feb 2026 22:07:13 +0000 (17:07 -0500)
committerChuck Lever <chuck.lever@oracle.com>
Mon, 30 Mar 2026 01:25:09 +0000 (21:25 -0400)
commitbb2a70b610810874838f176a0d157d5cd0226c18
treeaf68677af37804a948b432a010b9f18dff7edde0
parent5eae0e00dc4bdc5a56a1e5e405332622d0942e89
lockd: Hoist file_lock init out of nlm4svc_decode_shareargs()

The xdrgen-generated XDR decoders cannot initialize the
file_lock structure because it is an internal kernel type,
not part of the wire protocol. To prepare for converting
SHARE and UNSHARE procedures to use xdrgen, the file_lock
initialization must be moved from nlm4svc_decode_shareargs()
into the procedure handlers themselves.

This change removes one more dependency on the "struct
nlm_lock::fl" field in fs/lockd/xdr4.c, allowing the XDR
decoder to focus solely on unmarshalling wire data.

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