[Concept,29/34] ext4l: Move S_* inode flags to linux/fs.h
Commit Message
From: Simon Glass <simon.glass@canonical.com>
Move the inode attribute flags (S_SYNC, S_NOATIME, S_APPEND,
S_IMMUTABLE, S_DAX, S_DIRSYNC, S_ENCRYPTED, S_CASEFOLD, S_VERITY) and
the permission constant S_IRWXUGO from ext4_uboot.h to linux/fs.h where
they belong alongside other filesystem definitions.
Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
---
fs/ext4l/ext4_uboot.h | 15 ++-------------
include/linux/fs.h | 14 ++++++++++++++
2 files changed, 16 insertions(+), 13 deletions(-)
@@ -589,19 +589,8 @@ static inline int bdev_read_only(struct block_device *bdev)
#define I_FREEING (1 << 1)
#define I_DIRTY_DATASYNC (1 << 2)
-/* Inode flags for i_flags */
-#define S_SYNC 1
-#define S_NOATIME 2
-#define S_APPEND 4
-#define S_IMMUTABLE 8
-#define S_DAX 16
-#define S_DIRSYNC 32
-#define S_ENCRYPTED 64
-#define S_CASEFOLD 128
-#define S_VERITY 256
-
-/* Permission mode constants */
-#define S_IRWXUGO (S_IRWXU | S_IRWXG | S_IRWXO)
+/* S_SYNC, S_NOATIME, etc. inode flags are in linux/fs.h */
+/* S_IRWXUGO is in linux/fs.h */
/* Whiteout mode for overlayfs */
#define WHITEOUT_DEV 0
@@ -173,6 +173,20 @@ static inline void inode_init_once(struct inode *inode)
/* S_ISDIR, etc. - already in linux/stat.h */
#include <linux/stat.h>
+/* Inode flags for i_flags field */
+#define S_SYNC 1 /* Synchronous writes */
+#define S_NOATIME 2 /* No access time updates */
+#define S_APPEND 4 /* Append only */
+#define S_IMMUTABLE 8 /* Immutable file */
+#define S_DAX 16 /* Direct access */
+#define S_DIRSYNC 32 /* Directory sync */
+#define S_ENCRYPTED 64 /* Encrypted */
+#define S_CASEFOLD 128 /* Case-folded */
+#define S_VERITY 256 /* Verity enabled */
+
+/* Permission mode constants */
+#define S_IRWXUGO (S_IRWXU | S_IRWXG | S_IRWXO)
+
/* Directory entry types */
#define DT_UNKNOWN 0
#define DT_FIFO 1