All of lore.kernel.org
 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 2/3] NFSD: Include <linux/nfs_fh.h> where struct nfs_fh is used
Date: Tue, 18 Aug 2026 10:00:34 -0400	[thread overview]
Message-ID: <20260818140035.12740-2-cel@kernel.org> (raw)
In-Reply-To: <20260818140035.12740-1-cel@kernel.org>

struct nfsd4_copy embeds a struct nfs_fh, and nlm_fopen() reads the
size and data fields of one. Neither fs/nfsd/xdr4.h nor
fs/nfsd/lockd.c includes the header that defines the type; both
reach it by way of nfsd.h, which pulls in <linux/nfs.h>.

Add the direct include to both files, so nfsd.h can later drop the
<linux/nfs.h> it carries for no use of its own.

Signed-off-by: Chuck Lever <cel@kernel.org>
---
 fs/nfsd/lockd.c | 1 +
 fs/nfsd/xdr4.h  | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/fs/nfsd/lockd.c b/fs/nfsd/lockd.c
index 5ec0f5456063..f24e45dc37a0 100644
--- a/fs/nfsd/lockd.c
+++ b/fs/nfsd/lockd.c
@@ -9,6 +9,7 @@
 
 #include <linux/file.h>
 #include <linux/lockd/bind.h>
+#include <linux/nfs_fh.h>
 #include "nfsd.h"
 #include "nfserr.h"
 #include "vfs.h"
diff --git a/fs/nfsd/xdr4.h b/fs/nfsd/xdr4.h
index 7bbb375874ef..b841bc462dac 100644
--- a/fs/nfsd/xdr4.h
+++ b/fs/nfsd/xdr4.h
@@ -37,6 +37,8 @@
 #ifndef _LINUX_NFSD_XDR4_H
 #define _LINUX_NFSD_XDR4_H
 
+#include <linux/nfs_fh.h>
+
 #include "state.h"
 #include "vfs.h"
 
-- 
2.54.0


  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 [PATCH 1/3] NFSD: Move the nfs3.h include out of nfsd.h Chuck Lever
2026-08-18 14:00 ` Chuck Lever [this message]
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-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.