diff mbox

[13/15] btrfs-progs: don't use <linux/fs.h>

Message ID 1376522205-16992-14-git-send-email-zab@redhat.com (mailing list archive)
State Accepted, archived
Headers show

Commit Message

Zach Brown Aug. 14, 2013, 11:16 p.m. UTC
sparse can freak out when <linux/fs.h> is included because it redefines
approximately a gazillion symbols already found in <sys/mount.h>:

/usr/include/linux/fs.h:203:9: warning: preprocessor token MS_RDONLY redefined
/usr/include/sys/mount.h:37:9: this was the original definition

Happily, we don't actually need to include the low-level <linux/fs.h>
for anything.  One assumes it was just carried over from kernel space.

Signed-off-by: Zach Brown <zab@redhat.com>
---
 btrfs-convert.c | 1 -
 mkfs.c          | 1 -
 2 files changed, 2 deletions(-)
diff mbox

Patch

diff --git a/btrfs-convert.c b/btrfs-convert.c
index 828f361..a1fb645 100644
--- a/btrfs-convert.c
+++ b/btrfs-convert.c
@@ -31,7 +31,6 @@ 
 #include <fcntl.h>
 #include <unistd.h>
 #include <uuid/uuid.h>
-#include <linux/fs.h>
 
 #include "ctree.h"
 #include "disk-io.h"
diff --git a/mkfs.c b/mkfs.c
index 5724dec..8e38db7 100644
--- a/mkfs.c
+++ b/mkfs.c
@@ -33,7 +33,6 @@ 
 #include <unistd.h>
 #include <getopt.h>
 #include <uuid/uuid.h>
-#include <linux/fs.h>
 #include <ctype.h>
 #include <attr/xattr.h>
 #include <blkid/blkid.h>