From: Chuck Lever <cel@kernel.org>
To: NeilBrown <neil@brown.name>, Jeff Layton <jlayton@kernel.org>,
Olga Kornievskaia <okorniev@redhat.com>,
Dai Ngo <dai.ngo@oracle.com>, Tom Talpey <tom@talpey.com>
Cc: <linux-nfs@vger.kernel.org>
Subject: [PATCH v3 07/34] NFSD: Use xdrgen XDR functions for the NFSv3 NULL procedure
Date: Tue, 13 Oct 2026 08:49:11 -0400 [thread overview]
Message-ID: <20261013124913.316726-6-cel@kernel.org> (raw)
In-Reply-To: <20261013124913.316726-1-cel@kernel.org>
Update the NFSPROC3_NULL entry in the nfsd_procedures3 array
to use the generated XDR encoder and decoder functions
(xdrgen_svc_decode_void and xdrgen_svc_encode_void) instead of the
hand-written nfssvc_decode_voidarg and nfssvc_encode_voidres.
Also update pc_xdrressize to 0 since the NULL procedure returns
a void result with no XDR-encoded data.
Signed-off-by: Chuck Lever <cel@kernel.org>
---
fs/nfsd/nfs3proc.c | 35 +++++++++++++++++++++++------------
1 file changed, 23 insertions(+), 12 deletions(-)
diff --git a/fs/nfsd/nfs3proc.c b/fs/nfsd/nfs3proc.c
index 180601d2d139..0c4109bde2bb 100644
--- a/fs/nfsd/nfs3proc.c
+++ b/fs/nfsd/nfs3proc.c
@@ -130,10 +130,21 @@ static __be32 nfsd3_map_status(__be32 status)
}
/*
- * NULL call.
+ * A full specification of each of the following NFSv3 procedures is
+ * available in RFC 1813 Section 3.3.
*/
-static __be32
-nfsd3_proc_null(struct svc_rqst *rqstp)
+
+/**
+ * nfsd3_proc_null - NULL: Do nothing
+ * @rqstp: RPC transaction context
+ *
+ * Return:
+ * %rpc_success: RPC executed successfully
+ *
+ * RPC synopsis:
+ * void NFSPROC3_NULL(void) = 0;
+ */
+static __be32 nfsd3_proc_null(struct svc_rqst *rqstp)
{
return rpc_success;
}
@@ -925,15 +936,15 @@ nfsd3_proc_commit(struct svc_rqst *rqstp)
static const struct svc_procedure nfsd_procedures3[22] = {
[NFSPROC3_NULL] = {
- .pc_func = nfsd3_proc_null,
- .pc_decode = nfssvc_decode_voidarg,
- .pc_encode = nfssvc_encode_voidres,
- .pc_argsize = sizeof(struct nfsd_voidargs),
- .pc_argzero = sizeof(struct nfsd_voidargs),
- .pc_ressize = sizeof(struct nfsd_voidres),
- .pc_cachetype = RC_NOCACHE,
- .pc_xdrressize = ST,
- .pc_name = "NULL",
+ .pc_func = nfsd3_proc_null,
+ .pc_decode = xdrgen_svc_decode_void,
+ .pc_encode = xdrgen_svc_encode_void,
+ .pc_argsize = XDR_void,
+ .pc_argzero = 0,
+ .pc_ressize = 0,
+ .pc_cachetype = RC_NOCACHE,
+ .pc_xdrressize = XDR_void,
+ .pc_name = "NULL",
},
[NFSPROC3_GETATTR] = {
.pc_func = nfsd3_proc_getattr,
--
2.55.0
next prev parent reply other threads:[~2026-10-13 12:49 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-13 12:49 [PATCH v3 02/34] Documentation: Add the RPC language description of NFSv3 Chuck Lever
2026-10-13 12:49 ` [PATCH v3 03/34] NFSD: Add infrastructure for generating NFSv3 XDR encoders and decoders Chuck Lever
2026-10-13 12:49 ` [PATCH v3 04/34] NFSD: Replace nfs3.h with nfs3xdr_gen.h Chuck Lever
2026-10-13 12:49 ` [PATCH v3 05/34] NFSD: Replace the nfsd3_createres macro Chuck Lever
2026-10-13 12:49 ` [PATCH v3 06/34] NFSD: Relocate the NFSv3 XDR storage union into nfs3proc.c Chuck Lever
2026-10-13 12:49 ` Chuck Lever [this message]
2026-10-13 12:49 ` [PATCH v3 08/34] NFSD: Use xdrgen XDR functions for NFSv3 GETATTR procedure Chuck Lever
2026-10-13 12:49 ` [PATCH v3 09/34] NFSD: Use xdrgen XDR functions for NFSv3 SETATTR procedure Chuck Lever
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261013124913.316726-6-cel@kernel.org \
--to=cel@kernel.org \
--cc=dai.ngo@oracle.com \
--cc=jlayton@kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=neil@brown.name \
--cc=okorniev@redhat.com \
--cc=tom@talpey.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.