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 6/6] NFSD: Move nfsd_v4client() out of nfsd.h
Date: Fri, 17 Jul 2026 14:41:12 -0400	[thread overview]
Message-ID: <20260717184112.507548-7-cel@kernel.org> (raw)
In-Reply-To: <20260717184112.507548-1-cel@kernel.org>

nfsd_v4client() is the last user in nfsd.h of XDR-defined item
references. Once this helper moves out, <linux/nfs.h> and the other
XDR-specific headers nfsd.h includes have nothing left to provide,
and can be dropped.

Signed-off-by: Chuck Lever <cel@kernel.org>
---
 fs/nfsd/nfsd.h   | 5 +----
 fs/nfsd/nfssvc.c | 5 +++++
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/fs/nfsd/nfsd.h b/fs/nfsd/nfsd.h
index 1cccf5a3c034..64315890eef5 100644
--- a/fs/nfsd/nfsd.h
+++ b/fs/nfsd/nfsd.h
@@ -146,10 +146,7 @@ extern u64 nfsd_io_cache_write __read_mostly;
 
 extern int nfsd_max_blksize;
 
-static inline int nfsd_v4client(struct svc_rqst *rq)
-{
-	return rq && rq->rq_prog == NFS_PROGRAM && rq->rq_vers == 4;
-}
+bool nfsd_v4client(struct svc_rqst *rqstp);
 
 /*
  * lockd binding
diff --git a/fs/nfsd/nfssvc.c b/fs/nfsd/nfssvc.c
index 9cc8489978a3..c04ef9d180ce 100644
--- a/fs/nfsd/nfssvc.c
+++ b/fs/nfsd/nfssvc.c
@@ -207,6 +207,11 @@ int nfsd_minorversion(struct nfsd_net *nn, u32 minorversion, enum vers_op change
 	return 0;
 }
 
+bool nfsd_v4client(struct svc_rqst *rqstp)
+{
+	return rqstp && rqstp->rq_prog == NFS_PROGRAM && rqstp->rq_vers == 4;
+}
+
 bool nfsd_net_try_get(struct net *net) __must_hold(rcu)
 {
 	struct nfsd_net *nn = net_generic(net, nfsd_net_id);
-- 
2.54.0


      parent reply	other threads:[~2026-07-17 18:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-17 18:41 [PATCH 0/6] NFSv4-related tidying Chuck Lever
2026-07-17 18:41 ` [PATCH 1/6] NFSD: Move XDR encoding helpers out of xdr4.h Chuck Lever
2026-07-17 18:41 ` [PATCH 2/6] NFSD: Move pre-xdr'ed status codes out of nfsd.h Chuck Lever
2026-07-17 18:41 ` [PATCH 3/6] NFSD: Remove two unused NFSv4 constants Chuck Lever
2026-07-17 18:41 ` [PATCH 4/6] NFSD: Relocate NFSv4-internal constants to state.h Chuck Lever
2026-07-17 18:41 ` [PATCH 5/6] NFSD: Evacuate NFSv4 entry-point prototypes from nfsd.h Chuck Lever
2026-07-17 18:41 ` Chuck Lever [this message]

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=20260717184112.507548-7-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