From patchwork Mon Feb 16 11:36:03 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Thompson X-Patchwork-Id: 44695 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f70.google.com (mail-la0-f70.google.com [209.85.215.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 8DBA021544 for ; Mon, 16 Feb 2015 11:36:22 +0000 (UTC) Received: by labge10 with SMTP id ge10sf19043764lab.3 for ; Mon, 16 Feb 2015 03:36:21 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=Az+GFq0MNWdfPVH1grwncdSJIKxF1Km3D5WUD9uQRFo=; b=HPOMQwCmrFvuHoVvy4tuIkES4CHFUCBCf38/lLK5ocKn/OPsNyO3Wx3oF6Ce1Dbyvj 5fDjStCpElOjpcuNm7BLFbOXPM9iyhru5fzrJLf/X6LzHdqg3TAgzUwzKlqGYjh905nt VFf8VhX60NRmsoyMfknzHs40nrUrnvpQwNGn+92ogYJ4r5L7v4Tga33usROYFIXQIWxp DHRR+XbGckE3SKmsx7w0oqRt7rjESVion+oui7AImoVHIJfA3B9lV13Z7ycan9PPkpHn 0V9EPn4173kxRPG0OCn4FHBjQ+zMnTfNG39q1fyXsrcCfLZry1SmKzHZH3z3MDKNwZC1 Tp7Q== X-Gm-Message-State: ALoCoQmtZ24FmiBcfdab3kXGluj2S2nzXD8X6vLJK9aSyY8aOv6wCz2Cgv798K+583CqP9Um+Xwc X-Received: by 10.112.25.7 with SMTP id y7mr1164620lbf.21.1424086581557; Mon, 16 Feb 2015 03:36:21 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.22.193 with SMTP id g1ls496515laf.14.gmail; Mon, 16 Feb 2015 03:36:21 -0800 (PST) X-Received: by 10.112.30.135 with SMTP id s7mr21176566lbh.63.1424086581287; Mon, 16 Feb 2015 03:36:21 -0800 (PST) Received: from mail-lb0-f178.google.com (mail-lb0-f178.google.com. [209.85.217.178]) by mx.google.com with ESMTPS id oe8si7091691lbc.166.2015.02.16.03.36.21 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Feb 2015 03:36:21 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.178 as permitted sender) client-ip=209.85.217.178; Received: by mail-lb0-f178.google.com with SMTP id w7so26535170lbi.9 for ; Mon, 16 Feb 2015 03:36:21 -0800 (PST) X-Received: by 10.152.179.172 with SMTP id dh12mr18678106lac.76.1424086581007; Mon, 16 Feb 2015 03:36:21 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.112.35.133 with SMTP id h5csp1525702lbj; Mon, 16 Feb 2015 03:36:20 -0800 (PST) X-Received: by 10.194.92.9 with SMTP id ci9mr48802218wjb.142.1424086580258; Mon, 16 Feb 2015 03:36:20 -0800 (PST) Received: from mail-we0-f170.google.com (mail-we0-f170.google.com. [74.125.82.170]) by mx.google.com with ESMTPS id i4si21450745wjw.15.2015.02.16.03.36.20 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Feb 2015 03:36:20 -0800 (PST) Received-SPF: pass (google.com: domain of daniel.thompson@linaro.org designates 74.125.82.170 as permitted sender) client-ip=74.125.82.170; Received: by mail-we0-f170.google.com with SMTP id q59so28725005wes.1 for ; Mon, 16 Feb 2015 03:36:20 -0800 (PST) X-Received: by 10.180.74.141 with SMTP id t13mr45627037wiv.45.1424086579973; Mon, 16 Feb 2015 03:36:19 -0800 (PST) Received: from sundance.lan (cpc4-aztw19-0-0-cust157.18-1.cable.virginm.net. [82.33.25.158]) by mx.google.com with ESMTPSA id bi9sm15268832wib.18.2015.02.16.03.36.18 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Feb 2015 03:36:19 -0800 (PST) From: Daniel Thompson To: Christoph Hellwig Cc: Daniel Thompson , linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org, patches@linaro.org, linaro-kernel@lists.linaro.org, John Stultz , Sumit Semwal , "J. Bruce Fields" Subject: [PATCH] nfsd: Fix v2-only build regression Date: Mon, 16 Feb 2015 11:36:03 +0000 Message-Id: <1424086563-25570-1-git-send-email-daniel.thompson@linaro.org> X-Mailer: git-send-email 1.9.3 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: daniel.thompson@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.178 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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 Cc: Christoph Hellwig Cc: J. Bruce Fields --- fs/nfsd/xdr4.h | 2 ++ 1 file changed, 2 insertions(+) -- 1.9.3 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 *,