From: Simon Glass <simon.glass@canonical.com> Move struct user_namespace stub and init_user_ns extern declaration to include/linux/cred.h where they belong with other credential-related 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 | 6 +----- include/linux/cred.h | 9 +++++++++ 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/fs/ext4l/ext4_uboot.h b/fs/ext4l/ext4_uboot.h index 4931bd25cea..55a06d01996 100644 --- a/fs/ext4l/ext4_uboot.h +++ b/fs/ext4l/ext4_uboot.h @@ -174,11 +174,7 @@ static inline void memalloc_nofs_restore(unsigned int flags) { } /* IS_ENCRYPTED and FSCRYPT_SET_CONTEXT_MAX_SIZE are in ext4_fscrypt.h */ #define S_NOQUOTA 0 -/* User namespace - stub */ -struct user_namespace { - int dummy; -}; -extern struct user_namespace init_user_ns; +/* user_namespace and init_user_ns are in linux/cred.h */ /* * BUG_ON / BUG - stubs (not using linux/bug.h which panics) diff --git a/include/linux/cred.h b/include/linux/cred.h index a5afc267ba0..a3a972a5a73 100644 --- a/include/linux/cred.h +++ b/include/linux/cred.h @@ -50,4 +50,13 @@ struct cred { #define INVALID_UID ((kuid_t){-1}) #define INVALID_GID ((kgid_t){-1}) +/* + * User namespace stub - U-Boot doesn't have namespaces. + */ +struct user_namespace { + int dummy; +}; + +extern struct user_namespace init_user_ns; + #endif /* _LINUX_CRED_H */ -- 2.43.0