From: Simon Glass <simon.glass@canonical.com> Add the inode mutex nesting classes (I_MUTEX_NORMAL, I_MUTEX_PARENT, I_MUTEX_CHILD, I_MUTEX_XATTR, etc.) to include/linux/fs.h where they belong with other filesystem-related definitions, matching Linux kernel organisation. Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: Simon Glass <simon.glass@canonical.com> --- fs/ext4l/ext4_uboot.h | 6 +----- include/linux/fs.h | 10 ++++++++++ 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/fs/ext4l/ext4_uboot.h b/fs/ext4l/ext4_uboot.h index f3b1aaaa408..ba462af45e4 100644 --- a/fs/ext4l/ext4_uboot.h +++ b/fs/ext4l/ext4_uboot.h @@ -1344,11 +1344,7 @@ static inline void super_set_uuid(struct super_block *sb, const u8 *uuid, #define xattr_handler_can_list(h, d) ({ (void)(h); (void)(d); 0; }) #define xattr_prefix(h) ({ (void)(h); (const char *)NULL; }) -/* Inode lock mutex classes */ -#define I_MUTEX_XATTR 5 -#define I_MUTEX_CHILD 4 -#define I_MUTEX_PARENT 3 -#define I_MUTEX_NORMAL 2 +/* I_MUTEX_* inode lock classes are in linux/fs.h */ /* Nested inode locking stub */ #define inode_lock_nested(i, c) do { (void)(i); (void)(c); } while (0) diff --git a/include/linux/fs.h b/include/linux/fs.h index 28b57b59484..5c357cdacd2 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -260,4 +260,14 @@ static inline bool dir_emit(struct dir_context *ctx, const char *name, int len, #define dir_relax_shared(i) ({ (void)(i); 1; }) +/* Inode mutex nesting classes */ +enum { + I_MUTEX_NORMAL, + I_MUTEX_PARENT, + I_MUTEX_CHILD, + I_MUTEX_XATTR, + I_MUTEX_NONDIR2, + I_MUTEX_PARENT2, +}; + #endif /* _LINUX_FS_H */ -- 2.43.0