All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Thompson <daniel.thompson@linaro.org>
To: Christoph Hellwig <hch@lst.de>
Cc: Daniel Thompson <daniel.thompson@linaro.org>,
	linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org,
	patches@linaro.org, linaro-kernel@lists.linaro.org,
	John Stultz <john.stultz@linaro.org>,
	Sumit Semwal <sumit.semwal@linaro.org>,
	"J. Bruce Fields" <bfields@fieldses.org>
Subject: [PATCH] nfsd: Fix v2-only build regression
Date: Mon, 16 Feb 2015 11:36:03 +0000	[thread overview]
Message-ID: <1424086563-25570-1-git-send-email-daniel.thompson@linaro.org> (raw)

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@linaro.org>
Cc: Christoph Hellwig <hch@lst.de>
Cc: J. Bruce Fields <bfields@fieldses.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


             reply	other threads:[~2015-02-16 11:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-16 11:36 Daniel Thompson [this message]
2015-02-16 11:54 ` [PATCH] nfsd: Fix v2-only build regression Arnd Bergmann
2015-02-16  5:24   ` Daniel Thompson

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=1424086563-25570-1-git-send-email-daniel.thompson@linaro.org \
    --to=daniel.thompson@linaro.org \
    --cc=bfields@fieldses.org \
    --cc=hch@lst.de \
    --cc=john.stultz@linaro.org \
    --cc=linaro-kernel@lists.linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=patches@linaro.org \
    --cc=sumit.semwal@linaro.org \
    /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.