Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp4049047ybl; Mon, 12 Aug 2019 10:28:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqw3fLD7Qw3910NUVIywXakm1XoCepG4sy82/8lZsc8vMFfxL0dibpmpmD8WIHIFolzg4zY+ X-Received: by 2002:a65:60d3:: with SMTP id r19mr31396277pgv.91.1565630935796; Mon, 12 Aug 2019 10:28:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565630935; cv=none; d=google.com; s=arc-20160816; b=wa38ztOPkB/19BYqG/ps7TVG6fJA1MvgJ1g95PGn+SEyoJodohYggMFq9O1yScdBKl BMgpq08DlhLeh0Rmdw13RvfiNK/ekA6XAUO/JnxHlJYccJDKsd6GgJ6S85pgB8q9zW9y gwUboWR50hpxDCIdDJCsHUyYfv96vLUc68SDJxDH4tpAjsM06hFx4XJFkczktLxTnyCw PF+Gn7/7RY7U6ae98dcuFnm6BFIYf7MG0e0uDhiQh5CsSk+GRo63ReJCFvK+xIQrv9Sp fpwynU6ubPVnk9wce4/Dnxme6gtdZO1XcZl1/7R2ztPqh2gGHWBLop9mhi2fCmkfu2/D iYMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject; bh=vw/mqoks71QmzKgN6MkJ3FxyMGmV0NiHrhsGwy/SXmY=; b=Ipb2UNh3DS8Uy6WOkZbxCKYN8nDYYP6jS7laW9ByQMbKcJRP7TWdSdEdb3BnLsFhC3 obBmRiUiymdnF4oNsRkNFR9EnyZfnmm29/iPgaESr4JiFbXdG4zsC8ihSmJSlkeEWPK+ yGebW0NEmTQGEybxPGv5yIF0prq+gxJobCTGXeCvAiFpGwD57HoJ2lHmBcFKcCjUbNwg iLkjKuqWJOjs4zXH9ijE7fl28jeUtD9XHMGFWOZY+0ht6IDum+STmOAvFs6J6g4e9Weu 1Murv5y9PhzbDFnIw3ADO3vIr+ZVnDX5fxrfUtTr0wPunya17HCWgmQ+z9fFvKKzqE87 KLEA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y1si3223101plr.164.2019.08.12.10.28.31; Mon, 12 Aug 2019 10:28:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726457AbfHLR2I (ORCPT + 99 others); Mon, 12 Aug 2019 13:28:08 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48736 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726267AbfHLR2I (ORCPT ); Mon, 12 Aug 2019 13:28:08 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D21513098435; Mon, 12 Aug 2019 17:28:07 +0000 (UTC) Received: from madhat.boston.devel.redhat.com (ovpn-116-63.phx2.redhat.com [10.3.116.63]) by smtp.corp.redhat.com (Postfix) with ESMTP id 52D3D7A412; Mon, 12 Aug 2019 17:28:07 +0000 (UTC) Subject: Re: [PATCH] Fix include order between config.h and stat.h To: Zoltan Karcagi , linux-nfs@vger.kernel.org References: <5bcd51ef-9ffb-2650-108f-8d7b04beb655@gmail.com> <5c60f0b3-4498-96ec-be59-2dce85de3680@gmail.com> From: Steve Dickson Message-ID: <3e62432c-86fb-9599-09cb-4f6d314487f5@RedHat.com> Date: Mon, 12 Aug 2019 13:28:06 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <5c60f0b3-4498-96ec-be59-2dce85de3680@gmail.com> Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Mon, 12 Aug 2019 17:28:07 +0000 (UTC) Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On 7/26/19 10:44 AM, Zoltan Karcagi wrote: > At least on Arch linux ARM, the definition of struct stat in stat.h depends > on __USE_FILE_OFFSET64. This symbol comes from config.h when defined, > therefore config.h must always be included before stat.h. Fix all > occurrences where the order is wrong by moving config.h to the top. > > This fixes the client side error "Stale file handle" when mounting from > a server running Arch Linux ARM. > > Signed-off-by: Zoltan Karcagi Committed! steved. > --- > support/misc/nfsd_path.c | 5 ++++- > support/misc/xstat.c | 5 ++++- > utils/blkmapd/device-discovery.c | 8 ++++---- > utils/idmapd/idmapd.c | 8 ++++---- > 4 files changed, 16 insertions(+), 10 deletions(-) > > diff --git a/support/misc/nfsd_path.c b/support/misc/nfsd_path.c > index 84e48028..f078a668 100644 > --- a/support/misc/nfsd_path.c > +++ b/support/misc/nfsd_path.c > @@ -1,3 +1,7 @@ > +#ifdef HAVE_CONFIG_H > +#include > +#endif > + > #include > #include > #include > @@ -5,7 +9,6 @@ > #include > #include > > -#include "config.h" > #include "conffile.h" > #include "xmalloc.h" > #include "xlog.h" > diff --git a/support/misc/xstat.c b/support/misc/xstat.c > index fa047880..4c997eea 100644 > --- a/support/misc/xstat.c > +++ b/support/misc/xstat.c > @@ -1,3 +1,7 @@ > +#ifdef HAVE_CONFIG_H > +#include > +#endif > + > #include > #include > #include > @@ -5,7 +9,6 @@ > #include > #include > > -#include "config.h" > #include "xstat.h" > > #ifdef HAVE_FSTATAT > diff --git a/utils/blkmapd/device-discovery.c b/utils/blkmapd/device-discovery.c > index e811703d..f5f9b10b 100644 > --- a/utils/blkmapd/device-discovery.c > +++ b/utils/blkmapd/device-discovery.c > @@ -26,6 +26,10 @@ > * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. > */ > > +#ifdef HAVE_CONFIG_H > +#include "config.h" > +#endif /* HAVE_CONFIG_H */ > + > #include > #include > #include > @@ -51,10 +55,6 @@ > #include > #include > > -#ifdef HAVE_CONFIG_H > -#include "config.h" > -#endif /* HAVE_CONFIG_H */ > - > #include "device-discovery.h" > #include "xcommon.h" > #include "nfslib.h" > diff --git a/utils/idmapd/idmapd.c b/utils/idmapd/idmapd.c > index 62e37b8a..267acea5 100644 > --- a/utils/idmapd/idmapd.c > +++ b/utils/idmapd/idmapd.c > @@ -34,6 +34,10 @@ > * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. > */ > > +#ifdef HAVE_CONFIG_H > +#include "config.h" > +#endif /* HAVE_CONFIG_H */ > + > #include > #include > #include > @@ -62,10 +66,6 @@ > #include > #include > > -#ifdef HAVE_CONFIG_H > -#include "config.h" > -#endif /* HAVE_CONFIG_H */ > - > #include "xlog.h" > #include "conffile.h" > #include "queue.h" >