[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Mon, 08 Aug 2022 14:17:35 +0100
From: David Howells <dhowells@...hat.com>
To: linux-fsdevel@...r.kernel.org
cc: dhowells@...hat.com, Ian Kent <raven@...maw.net>,
Alexander Viro <viro@...iv.linux.org.uk>,
Christian Brauner <christian@...uner.io>,
linux-api@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [RFC][PATCH] uapi: Remove the inclusion of linux/mount.h from uapi/linux/fs.h
Hi,
We're seeing issues in autofs and xfstests whereby linux/mount.h (the UAPI
version) as included indirectly by linux/fs.h is conflicting with
sys/mount.h (there's a struct and an enum).
Would it be possible to just remove the #include from linux/fs.h (as patch
below) and rely on those hopefully few things that need mount flags that don't
use the glibc header for them working around it by configuration?
David
---
uapi: Remove the inclusion of linux/mount.h from uapi/linux/fs.h
Remove the inclusion of <linux/mount.h> from uapi/linux/fs.h as it
interferes with definitions in sys/mount.h - but linux/fs.h is needed by
various things where mount flags and structs are not.
Note that this will likely have the side effect of causing some build
failures.
Reported-by: Ian Kent <raven@...maw.net>
Signed-off-by: David Howells <dhowells@...hat.com>
cc: Alexander Viro <viro@...iv.linux.org.uk>
cc: Christian Brauner <christian@...uner.io>
cc: linux-fsdevel@...r.kernel.org
cc: linux-api@...r.kernel.org
---
include/uapi/linux/fs.h | 5 -----
1 file changed, 5 deletions(-)
diff --git a/include/uapi/linux/fs.h b/include/uapi/linux/fs.h
index bdf7b404b3e7..7a2597ac59ed 100644
--- a/include/uapi/linux/fs.h
+++ b/include/uapi/linux/fs.h
@@ -17,11 +17,6 @@
#include <linux/fscrypt.h>
#endif
-/* Use of MS_* flags within the kernel is restricted to core mount(2) code. */
-#if !defined(__KERNEL__)
-#include <linux/mount.h>
-#endif
-
/*
* It's silly to have NR_OPEN bigger than NR_FILE, but you can change
* the file limit at runtime and only root can increase the per-process
Powered by blists - more mailing lists