NFSD: Make "stats.h" self-contained

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.

Link: https://patch.msgid.link/20260712204554.125308-2-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:46 -04:00
parent 1663ea5b24
commit 715a22ca5e

View File

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