Skip to contentSkip to conversation

vfs: explicitly include fileattr.h dependency

PATCH In review Keith Busch 4 participants 4 messages Jun 22, 2021 – Jun 23, 2021 VFS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 vfs: explicitly include fileattr.h dependency

linux/fileattr.h has an implicit requirement that linux/fs.h be included first. Make that dependency explicit.

Cc Miklos Szeredi <[email protected]>
Cc Matthew Wilcox <[email protected]>
Cc Jens Axboe: <[email protected]>
---
 include/linux/fileattr.h | 2 ++
 1 file changed, 2 insertions(+)
include/linux/fileattr.h +2 -0
index 9e37e063ac69..34e153172a85 100644
@@ -3,6 +3,8 @@
 #ifndef _LINUX_FILEATTR_H
 #define _LINUX_FILEATTR_H
 
+#include <linux/fs.h>
+
 /* Flags shared betwen flags/xflags */
 #define FS_COMMON_FL \
 	(FS_SYNC_FL | FS_IMMUTABLE_FL | FS_APPEND_FL | \
Signature · 1 line
2.25.4
#3 lore raw
In reply to Keith Busch
Quoted 17 lines · Keith Busch

linux/fileattr.h has an implicit requirement that linux/fs.h be included first. Make that dependency explicit.

Cc Miklos Szeredi <[email protected]>
Cc Matthew Wilcox <[email protected]>
Cc Jens Axboe: <[email protected]>
---
 include/linux/fileattr.h | 2 ++
 1 file changed, 2 insertions(+)
include/linux/fileattr.h +0 -0
index 9e37e063ac69..34e153172a85 100644

include/linux/fileattr.h

Quoted 9 lines
include/linux/fileattr.h +2 -1
@@ -3,6 +3,8 @@
 #ifndef _LINUX_FILEATTR_H
 #define _LINUX_FILEATTR_H
 
+#include <linux/fs.h>
+
 /* Flags shared betwen flags/xflags */
 #define FS_COMMON_FL \
        (FS_SYNC_FL | FS_IMMUTABLE_FL | FS_APPEND_FL | \
--

Thinking out loud:
Would it be better to split out the flag definitions to uapi/linux/fileattr.h and include it from here and from uapi/linux/fs.h?

Will that cause UAPI pain??

Thanks,
Amir.