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 1/3] NFSD: Move the nfs3.h include out of nfsd.h
Date: Tue, 18 Aug 2026 10:00:33 -0400 [thread overview]
Message-ID: <20260818140035.12740-1-cel@kernel.org> (raw)
fs/nfsd/nfsd.h is included throughout the server, yet it uses no
NFSv3 protocol definition of its own. The <linux/nfs3.h> include
there served only to make those definitions reach the few source
files that need them, by way of nfsd.h itself or the xdr.h chain
that pulls it in.
Give each consumer its own include and drop the one in nfsd.h, so
the header no longer carries a dependency unrelated to its
contents. nfsfh.c, nfsctl.c, nfs3xdr.c, nfs3proc.c, and nfs2acl.c
reference NFS3_* definitions directly; add <linux/nfs3.h> to each.
Signed-off-by: Chuck Lever <cel@kernel.org>
---
fs/nfsd/nfs2acl.c | 1 +
fs/nfsd/nfs3proc.c | 1 +
fs/nfsd/nfs3xdr.c | 1 +
fs/nfsd/nfsctl.c | 1 +
fs/nfsd/nfsd.h | 1 -
fs/nfsd/nfsfh.c | 1 +
6 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/fs/nfsd/nfs2acl.c b/fs/nfsd/nfs2acl.c
index 33610deda3b0..0a5c444fef99 100644
--- a/fs/nfsd/nfs2acl.c
+++ b/fs/nfsd/nfs2acl.c
@@ -10,6 +10,7 @@
/* FIXME: nfsacl.h is a broken header */
#include <linux/nfsacl.h>
#include <linux/gfp.h>
+#include <linux/nfs3.h>
#include "cache.h"
#include "xdr3.h"
#include "vfs.h"
diff --git a/fs/nfsd/nfs3proc.c b/fs/nfsd/nfs3proc.c
index 17bbe5d13f18..60cd01b6a37d 100644
--- a/fs/nfsd/nfs3proc.c
+++ b/fs/nfsd/nfs3proc.c
@@ -9,6 +9,7 @@
#include <linux/ext2_fs.h>
#include <linux/magic.h>
#include <linux/namei.h>
+#include <linux/nfs3.h>
#include "cache.h"
#include "xdr3.h"
diff --git a/fs/nfsd/nfs3xdr.c b/fs/nfsd/nfs3xdr.c
index 090cea8e545d..a14e829e1c41 100644
--- a/fs/nfsd/nfs3xdr.c
+++ b/fs/nfsd/nfs3xdr.c
@@ -8,6 +8,7 @@
*/
#include <linux/namei.h>
+#include <linux/nfs3.h>
#include <linux/sunrpc/svc_xprt.h>
#include "xdr3.h"
#include "auth.h"
diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c
index 4e5e083d8477..0117b89ba538 100644
--- a/fs/nfsd/nfsctl.c
+++ b/fs/nfsd/nfsctl.c
@@ -20,6 +20,7 @@
#include <linux/module.h>
#include <linux/fsnotify.h>
#include <linux/nfslocalio.h>
+#include <linux/nfs3.h>
#include "idmap.h"
#include "nfsd.h"
diff --git a/fs/nfsd/nfsd.h b/fs/nfsd/nfsd.h
index 64315890eef5..a145294c59c8 100644
--- a/fs/nfsd/nfsd.h
+++ b/fs/nfsd/nfsd.h
@@ -14,7 +14,6 @@
#include <linux/nfs.h>
#include <linux/nfs2.h>
-#include <linux/nfs3.h>
#include <linux/sunrpc/svc.h>
#include <linux/sunrpc/svc_xprt.h>
diff --git a/fs/nfsd/nfsfh.c b/fs/nfsd/nfsfh.c
index b1f3c22af525..2bd6907f443f 100644
--- a/fs/nfsd/nfsfh.c
+++ b/fs/nfsd/nfsfh.c
@@ -9,6 +9,7 @@
*/
#include <linux/exportfs.h>
+#include <linux/nfs3.h>
#include <linux/sunrpc/svcauth_gss.h>
#include <crypto/utils.h>
--
2.54.0
next reply other threads:[~2026-08-18 14:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-18 14:00 Chuck Lever [this message]
2026-08-18 14:00 ` [PATCH 2/3] NFSD: Include <linux/nfs_fh.h> where struct nfs_fh is used Chuck Lever
2026-08-18 14:00 ` [PATCH 3/3] NFSD: Clean up header guards in fs/nfsd/xdr.h 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=20260818140035.12740-1-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox