NFSD: Move the export.h include from nfsd.h to auth.c

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.

Link: https://patch.msgid.link/20260712204554.125308-6-cel@kernel.org
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <cel@kernel.org>
This commit is contained in:
Chuck Lever 2026-07-12 16:45:50 -04:00
parent a29532948a
commit 71a7c58770
2 changed files with 1 additions and 2 deletions

View File

@ -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)

View File

@ -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)