mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-10 20:48:12 +00:00
lockd: Use xdrgen XDR functions for the NLMv3 SM_NOTIFY procedure
Continue the xdrgen migration by converting NLMv3 SM_NOTIFY, a private callback from statd to notify lockd when a remote host has rebooted. The procedure now uses nlm_svc_decode_nlm_notifyargs and nlm_svc_encode_void, generated from the NLM version 3 protocol specification. A new struct nlm_notifyargs_wrapper bridges between the xdrgen-generated nlm_notifyargs and the lockd_reboot structure expected by nlm_host_rebooted(). The wrapper contains both the xdrgen-decoded arguments and a reboot field for the existing API. Setting pc_argzero to zero is safe because the generated decoder fills argp->xdrgen 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 SM_NOTIFY 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>
This commit is contained in:
parent
e0018ec659
commit
371275eeb0
1 changed files with 55 additions and 31 deletions
Loading…
Add table
Add a link
Reference in a new issue