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

Convert the SM_NOTIFY procedure to use xdrgen functions
nlm4_svc_decode_nlm4_notifyargs and nlm4_svc_encode_void.
SM_NOTIFY is a private callback from statd to notify lockd
when a remote host has rebooted.

This patch introduces struct nlm4_notifyargs_wrapper to
bridge between the xdrgen-generated nlm4_notifyargs and
the nlm_reboot structure expected by nlm_host_rebooted().
The wrapper contains both the xdrgen-decoded arguments
and a reboot field for the existing API.

The pc_argzero field is set to zero because xdrgen decoders
reliably initialize all arguments, making the early
defensive memset unnecessary.

This change also corrects the pc_xdrressize field, which
previously contained a placeholder value.

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