From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DF50CC31E40 for ; Mon, 12 Aug 2019 17:28:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B81E72067D for ; Mon, 12 Aug 2019 17:28:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726457AbfHLR2I (ORCPT ); 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" >