[Concept,06/16] ext4l: Move user_namespace to linux/cred.h
Commit Message
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(-)
@@ -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)
@@ -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 */