From: Simon Glass <simon.glass@canonical.com>
Move the ATTR_* flags (used to indicate which fields of struct iattr
are valid) from ext4_uboot.h to linux/fs.h alongside the struct iattr
definition.
This includes: ATTR_MODE, ATTR_UID, ATTR_GID, ATTR_SIZE, ATTR_ATIME,
ATTR_MTIME, ATTR_CTIME, ATTR_ATIME_SET, ATTR_MTIME_SET, ATTR_FORCE,
ATTR_KILL_SUID, ATTR_KILL_SGID, ATTR_TIMES_SET.
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 | 15 +++++++++++++++
2 files changed, 16 insertions(+), 14 deletions(-)
@@ -596,20 +596,7 @@ static inline int bdev_read_only(struct block_device *bdev)
/* Superblock flags */
#define SB_LAZYTIME (1 << 25)
-/* iattr valid flags */
-#define ATTR_MODE (1 << 0)
-#define ATTR_UID (1 << 1)
-#define ATTR_GID (1 << 2)
-#define ATTR_SIZE (1 << 3)
-#define ATTR_ATIME (1 << 4)
-#define ATTR_MTIME (1 << 5)
-#define ATTR_CTIME (1 << 6)
-#define ATTR_ATIME_SET (1 << 7)
-#define ATTR_MTIME_SET (1 << 8)
-#define ATTR_FORCE (1 << 9)
-#define ATTR_KILL_SUID (1 << 11)
-#define ATTR_KILL_SGID (1 << 12)
-#define ATTR_TIMES_SET ((1 << 7) | (1 << 8))
+/* ATTR_* iattr valid flags are in linux/fs.h */
/* STATX flags and attributes */
#define STATX_BTIME 0x00000800U
@@ -160,6 +160,21 @@ struct iattr {
loff_t ia_size;
};
+/* iattr valid flags - specify which fields of iattr are valid */
+#define ATTR_MODE (1 << 0)
+#define ATTR_UID (1 << 1)
+#define ATTR_GID (1 << 2)
+#define ATTR_SIZE (1 << 3)
+#define ATTR_ATIME (1 << 4)
+#define ATTR_MTIME (1 << 5)
+#define ATTR_CTIME (1 << 6)
+#define ATTR_ATIME_SET (1 << 7)
+#define ATTR_MTIME_SET (1 << 8)
+#define ATTR_FORCE (1 << 9)
+#define ATTR_KILL_SUID (1 << 11)
+#define ATTR_KILL_SGID (1 << 12)
+#define ATTR_TIMES_SET (ATTR_ATIME_SET | ATTR_MTIME_SET)
+
/* writeback_control - defined in linux/compat.h */
/* fsnotify - stub */