Commit f0eec0eb authored by Chuck Lever's avatar Chuck Lever
Browse files

lockd: Use xdrgen XDR functions for the NLMv4 CANCEL_RES procedure



Convert the CANCEL_RES procedure to use xdrgen functions
nlm4_svc_decode_nlm4_res and nlm4_svc_encode_void.
CANCEL_RES is a callback procedure where the client sends
cancel results back to the server after an async CANCEL
request.

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: default avatarJeff Layton <jlayton@kernel.org>
Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
parent 50976ab9
Loading
Loading
Loading
Loading
+9 −9
Original line number Diff line number Diff line
@@ -1250,14 +1250,14 @@ static const struct svc_procedure nlm4svc_procedures[24] = {
		.pc_xdrressize	= XDR_void,
		.pc_name	= "LOCK_RES",
	},
	[NLMPROC_CANCEL_RES] = {
	[NLMPROC4_CANCEL_RES] = {
		.pc_func	= nlm4svc_proc_null,
		.pc_decode = nlm4svc_decode_void,
		.pc_encode = nlm4svc_encode_void,
		.pc_argsize = sizeof(struct nlm_res),
		.pc_argzero = sizeof(struct nlm_res),
		.pc_ressize = sizeof(struct nlm_void),
		.pc_xdrressize = St,
		.pc_decode	= nlm4_svc_decode_nlm4_res,
		.pc_encode	= nlm4_svc_encode_void,
		.pc_argsize	= sizeof(struct nlm4_res),
		.pc_argzero	= 0,
		.pc_ressize	= 0,
		.pc_xdrressize	= XDR_void,
		.pc_name	= "CANCEL_RES",
	},
	[NLMPROC_UNLOCK_RES] = {