From patchwork Wed May 18 17:40:54 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeffrey Bastian X-Patchwork-Id: 9121551 Return-Path: X-Original-To: patchwork-fstests@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 96833BF29F for ; Wed, 18 May 2016 17:41:00 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C3AC320364 for ; Wed, 18 May 2016 17:40:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9E2AF2011B for ; Wed, 18 May 2016 17:40:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932884AbcERRk6 (ORCPT ); Wed, 18 May 2016 13:40:58 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35346 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932882AbcERRk5 (ORCPT ); Wed, 18 May 2016 13:40:57 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 50C167F6B4 for ; Wed, 18 May 2016 17:40:56 +0000 (UTC) Received: from tarantula.localdomain (ovpn-116-102.phx2.redhat.com [10.3.116.102]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u4IHesil007262 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Wed, 18 May 2016 13:40:56 -0400 Date: Wed, 18 May 2016 12:40:54 -0500 From: Jeffrey Bastian To: fstests@vger.kernel.org Subject: [PATCH] avoid struct fsxattr redefinition Message-ID: <20160518174054.GA27634@tarantula.localdomain> Mail-Followup-To: fstests@vger.kernel.org MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.23.1-rc1 (2014-03-12) X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Wed, 18 May 2016 17:40:56 +0000 (UTC) Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Linux kernel v4.5 defines 'struct fsxattr' in linux/fs.h [0] but it's still defined in xfs/linux.h as a backup [1]. If the files are included in the wrong order, the compiler will complain with a redefinition error. This patch moves linux/fs.h (and linux/magic.h) before the xfs headers for the t_immutable.c and fsstress.c tests. [0] https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=334e580a6f97e [1] http://oss.sgi.com/cgi-bin/gitweb.cgi?p=xfs/cmds/xfsprogs.git;a=blob;f=include/linux.h;h=cc0f70ceed72#l183 Signed-off-by: Jeffrey Bastian --- ltp/fsstress.c | 2 +- src/t_immutable.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ltp/fsstress.c b/ltp/fsstress.c index 1e6c913294ae..7e7cf608f5f3 100644 --- a/ltp/fsstress.c +++ b/ltp/fsstress.c @@ -16,6 +16,7 @@ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#include #include "global.h" #ifdef HAVE_ATTR_XATTR_H @@ -34,7 +35,6 @@ #include #endif -#include #ifndef FS_IOC_GETFLAGS #define FS_IOC_GETFLAGS _IOR('f', 1, long) #endif diff --git a/src/t_immutable.c b/src/t_immutable.c index 87ffc75f2d02..7fd9e5dd9625 100644 --- a/src/t_immutable.c +++ b/src/t_immutable.c @@ -38,11 +38,11 @@ #include #include #include +#include +#include #include #include #include -#include -#include #ifndef XFS_SUPER_MAGIC #define XFS_SUPER_MAGIC 0x58465342