Linux NFS development
 help / color / mirror / Atom feed
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/9] NFSD: Make "stats.h" self-contained
Date: Sun, 12 Jul 2026 16:45:46 -0400	[thread overview]
Message-ID: <20260712204554.125308-2-cel@kernel.org> (raw)
In-Reply-To: <20260712204554.125308-1-cel@kernel.org>

The inline helpers in fs/nfsd/stats.h dereference struct nfsd_net and
struct svc_export, yet the header includes neither "netns.h" nor
"export.h", where those types are defined. Each helper therefore
compiles only when its translation unit has already pulled in both
headers ahead of "stats.h" -- a hidden ordering requirement that has
to be honored at every include site.

Include "netns.h" and "export.h" from "stats.h" directly so the
header stands on its own, and no consumer has to order its includes
to satisfy it.

Signed-off-by: Chuck Lever <cel@kernel.org>
---
 fs/nfsd/stats.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/fs/nfsd/stats.h b/fs/nfsd/stats.h
index e4efb0e4e56d..87736b7fbf28 100644
--- a/fs/nfsd/stats.h
+++ b/fs/nfsd/stats.h
@@ -10,6 +10,9 @@
 #include <uapi/linux/nfsd/stats.h>
 #include <linux/percpu_counter.h>
 
+#include "export.h"
+#include "netns.h"
+
 struct proc_dir_entry *nfsd_proc_stat_init(struct net *net);
 void nfsd_proc_stat_shutdown(struct net *net);
 
-- 
2.54.0


  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 ` Chuck Lever [this message]
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 ` [PATCH 5/9] NFSD: Move the export.h include from nfsd.h to auth.c Chuck Lever
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-2-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