1 From 7ea1df02d0f2549b6249c8bee1f6ae02bf1251a9 Mon Sep 17 00:00:00 2001
2 From: Baruch Siach <baruch@tkos.co.il>
3 Date: Sun, 25 Mar 2018 00:01:23 +0300
4 Subject: [PATCH] xfs_scrub: fix build with older kernel headers
6 The OVERRIDE_SYSTEM_FSXATTR macro in include/linux.h is meant to
7 override the linux/fs.h kernel header provided struct fsxattr for
8 kernels older than v4.7. A few source files include linux/fs.h before
9 the local linux.h, making this override ineffective. Remove these header
10 includes from the source files, and rely on the linux.h include alone.
12 This fixes the following build failures:
14 In file included from ../include/xfs.h:37:0,
16 ../include/xfs/linux.h:185:8: error: redefinition of 'struct fsxattr'
20 In file included from ../include/xfs.h:37:0,
21 from ../include/project.h:22,
22 from ../include/input.h:24,
24 ../include/xfs/linux.h:185:8: error: redefinition of 'struct fsxattr'
28 Cc: Darrick J. Wong <darrick.wong@oracle.com>
29 Signed-off-by: Baruch Siach <baruch@tkos.co.il>
31 Upstream status: https://patchwork.kernel.org/patch/10306419/
35 2 files changed, 2 deletions(-)
37 diff --git a/scrub/disk.c b/scrub/disk.c
38 index e12175c8656c..54d7a2a77c45 100644
42 #include <sys/ioctl.h>
43 #include <sys/statvfs.h>
45 -#include <linux/fs.h>
49 diff --git a/scrub/phase1.c b/scrub/phase1.c
50 index 6cd544233c94..d15689e1b544 100644
57 -#include <linux/fs.h>
59 #include "workqueue.h"