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 5/9] NFSD: Move the export.h include from nfsd.h to auth.c
Date: Sun, 12 Jul 2026 16:45:50 -0400 [thread overview]
Message-ID: <20260712204554.125308-6-cel@kernel.org> (raw)
In-Reply-To: <20260712204554.125308-1-cel@kernel.org>
Nothing declared in fs/nfsd/nfsd.h references a type, macro, or
function that export.h defines. The include is present only so
that source files including nfsd.h pick up export.h's definitions
transitively. Of the twenty source files that include nfsd.h, only
auth.c relies on that side effect: it names struct svc_export and the
NFSEXP_* flags yet includes no header that supplies them.
Add the export.h include directly to auth.c, then drop it from nfsd.h
so the header carries only the dependencies its own declarations
require.
Signed-off-by: Chuck Lever <cel@kernel.org>
---
fs/nfsd/auth.c | 1 +
fs/nfsd/nfsd.h | 2 --
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs/nfsd/auth.c b/fs/nfsd/auth.c
index 4dc327e02456..e3b4a35caac6 100644
--- a/fs/nfsd/auth.c
+++ b/fs/nfsd/auth.c
@@ -3,6 +3,7 @@
#include <linux/sched.h>
#include "nfsd.h"
+#include "export.h"
#include "auth.h"
int nfsexp_flags(struct svc_cred *cred, struct svc_export *exp)
diff --git a/fs/nfsd/nfsd.h b/fs/nfsd/nfsd.h
index 4583d7d51a88..b35e9a9a112d 100644
--- a/fs/nfsd/nfsd.h
+++ b/fs/nfsd/nfsd.h
@@ -23,8 +23,6 @@
#include <uapi/linux/nfsd/debug.h>
-#include "export.h"
-
#undef ifdebug
#ifdef CONFIG_SUNRPC_DEBUG
# define ifdebug(flag) if (nfsd_debug & NFSDDBG_##flag)
--
2.54.0
next prev parent reply other threads:[~2026-07-12 20:45 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-12 20:45 [PATCH 0/9] Start reorganizing fs/nfsd/nfsd.h Chuck Lever
2026-07-12 20:45 ` [PATCH 1/9] NFSD: Make "stats.h" self-contained Chuck Lever
2026-07-12 20:45 ` [PATCH 2/9] NFSD: Explicitly include "stats.h" Chuck Lever
2026-07-12 20:45 ` [PATCH 3/9] NFSD: include "netns.h" Chuck Lever
2026-07-12 20:45 ` [PATCH 4/9] NFSD: Remove '#include "nfsd.h"' from fs/nfsd/cache.h Chuck Lever
2026-07-12 20:45 ` Chuck Lever [this message]
2026-07-12 20:45 ` [PATCH 6/9] NFSD: Move struct readdir_cd Chuck Lever
2026-07-12 20:45 ` [PATCH 7/9] NFSD: Relocate nfsd_user_namespace() Chuck Lever
2026-07-12 20:45 ` [PATCH 8/9] NFSD: Relocate nfsd4_set_netaddr() Chuck Lever
2026-07-12 20:45 ` [PATCH 9/9] NFSD: Relocate NFSv4 "supported attributes" to new header 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=20260712204554.125308-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox