From: Simon Glass <simon.glass@canonical.com> Move definitions to their canonical Linux kernel locations: - WHITEOUT_DEV and WHITEOUT_MODE to linux/fs.h - kmem_cache_create_usercopy() to linux/slab.h Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: Simon Glass <simon.glass@canonical.com> --- fs/ext4l/ext4_uboot.h | 7 ------- include/linux/fs.h | 4 ++++ include/linux/slab.h | 2 ++ 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/fs/ext4l/ext4_uboot.h b/fs/ext4l/ext4_uboot.h index 5c6a8711a9f..a7c7abf30b8 100644 --- a/fs/ext4l/ext4_uboot.h +++ b/fs/ext4l/ext4_uboot.h @@ -151,9 +151,6 @@ struct pipe_inode_info; struct kstat; struct path; -#define WHITEOUT_DEV 0 -#define WHITEOUT_MODE 0 - /* QSTR_INIT and dotdot_name are now in linux/dcache.h */ #include <linux/minmax.h> @@ -283,10 +280,6 @@ void trace_ext4_error(struct super_block *sb, const char *func, unsigned int lin /* DAX - declaration for stub.c */ void fs_put_dax(void *dax, void *holder); -/* slab usercopy - use regular kmem_cache_create */ -#define kmem_cache_create_usercopy(n, sz, al, fl, uo, us, c) \ - kmem_cache_create(n, sz, al, fl, c) - /* Memory allocation - declarations for stub.c */ void *kvzalloc(size_t size, gfp_t flags); #define kvmalloc(size, flags) kvzalloc(size, flags) diff --git a/include/linux/fs.h b/include/linux/fs.h index 2fa12a40aa7..69178235141 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -397,6 +397,10 @@ static inline void inode_init_once(struct inode *inode) #define RENAME_EXCHANGE (1 << 1) #define RENAME_WHITEOUT (1 << 2) +/* Whiteout device - used for overlayfs */ +#define WHITEOUT_DEV 0 +#define WHITEOUT_MODE 0 + /* Superblock flags */ #define SB_RDONLY (1 << 0) /* Read-only mount */ #define SB_POSIXACL (1 << 16) /* POSIX ACL support */ diff --git a/include/linux/slab.h b/include/linux/slab.h index 628126e0a3b..6722450a5cc 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h @@ -126,6 +126,8 @@ struct kmem_cache { struct kmem_cache *get_mem(int element_sz); #define kmem_cache_create(a, sz, c, d, e) ({ (void)(a); (void)(e); get_mem(sz); }) +#define kmem_cache_create_usercopy(n, sz, al, fl, uo, us, c) \ + kmem_cache_create(n, sz, al, fl, c) /** * KMEM_CACHE - shorthand for creating a named kmem_cache -- 2.43.0