[PATCH 6/6] NFSD: Move nfsd_v4client() out of nfsd.h
Chuck Lever <[email protected]> Fri, 17 Jul 2026 14:41:12 -0400
| Newsgroups | gmane.linux.nfs |
|---|---|
| Message-ID | <[email protected]> |
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 <[email protected]> --- 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