[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1424086563-25570-1-git-send-email-daniel.thompson@linaro.org>
Date: Mon, 16 Feb 2015 11:36:03 +0000
From: Daniel Thompson <daniel.thompson@...aro.org>
To: Christoph Hellwig <hch@....de>
Cc: Daniel Thompson <daniel.thompson@...aro.org>,
linux-nfs@...r.kernel.org, linux-kernel@...r.kernel.org,
patches@...aro.org, linaro-kernel@...ts.linaro.org,
John Stultz <john.stultz@...aro.org>,
Sumit Semwal <sumit.semwal@...aro.org>,
"J. Bruce Fields" <bfields@...ldses.org>
Subject: [PATCH] nfsd: Fix v2-only build regression
Currently if nfsd is configured as v2 only then the kernel fails to build.
This is a regression introduced by 9cf514ccfacb("nfsd: implement pNFS
operations"). It occurs because inline code from the xdr4.h header is
now included from generic nfsd code (via pnfs.h).
This patch takes the simplest route and makes conditional the problematic
inline function.
Note: I also tried extending the #ifdef CONFIG_NFSD_PNFS to cover almost
all of the pnfs.h header file. That works great too but feels more
invasive. However I can dust this off if that were preferable for
any reason.
Signed-off-by: Daniel Thompson <daniel.thompson@...aro.org>
Cc: Christoph Hellwig <hch@....de>
Cc: J. Bruce Fields <bfields@...ldses.org>
---
fs/nfsd/xdr4.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/nfsd/xdr4.h b/fs/nfsd/xdr4.h
index 0bda93e58e1b..960a75d921c0 100644
--- a/fs/nfsd/xdr4.h
+++ b/fs/nfsd/xdr4.h
@@ -627,6 +627,7 @@ void warn_on_nonidempotent_op(struct nfsd4_op *op);
#define NFS4_SVC_XDRSIZE sizeof(struct nfsd4_compoundargs)
+#ifdef CONFIG_NFSD_V3
static inline void
set_change_info(struct nfsd4_change_info *cinfo, struct svc_fh *fhp)
{
@@ -642,6 +643,7 @@ set_change_info(struct nfsd4_change_info *cinfo, struct svc_fh *fhp)
cinfo->after_ctime_nsec = fhp->fh_post_attr.ctime.tv_nsec;
}
+#endif
int nfs4svc_encode_voidres(struct svc_rqst *, __be32 *, void *);
int nfs4svc_decode_compoundargs(struct svc_rqst *, __be32 *,
--
1.9.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists