[Concept,21/33] ext4l: Move xattr helper stubs to linux/xattr.h

Message ID 20260121220857.2137568-22-sjg@u-boot.org
State New
Headers
Series Reorganise ext4l compatibility stubs |

Commit Message

Simon Glass Jan. 21, 2026, 10:08 p.m. UTC
  From: Simon Glass <simon.glass@canonical.com>

Move xattr_handler_can_list() and xattr_prefix() stubs to linux/xattr.h
where they belong.

This reduces ext4_uboot.h from 458 to 455 lines.

Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
---

 fs/ext4l/ext4_uboot.h | 5 +----
 include/linux/xattr.h | 4 ++++
 2 files changed, 5 insertions(+), 4 deletions(-)
  

Patch

diff --git a/fs/ext4l/ext4_uboot.h b/fs/ext4l/ext4_uboot.h
index 7b883f9a7ff..6b943934069 100644
--- a/fs/ext4l/ext4_uboot.h
+++ b/fs/ext4l/ext4_uboot.h
@@ -350,10 +350,7 @@  void *fs_dax_get_by_bdev(struct block_device *bdev, u64 *start, u64 *len,
 			 void *holder);
 
 #include <linux/mbcache.h>
-
-/* xattr helper stubs for xattr.c */
-#define xattr_handler_can_list(h, d)		({ (void)(h); (void)(d); 0; })
-#define xattr_prefix(h)				({ (void)(h); (const char *)NULL; })
+#include <linux/xattr.h>
 
 /* Filesystem sync - declaration for stub.c */
 int sync_filesystem(void *sb);
diff --git a/include/linux/xattr.h b/include/linux/xattr.h
index db1bf4d3ee6..11cb3c8ad05 100644
--- a/include/linux/xattr.h
+++ b/include/linux/xattr.h
@@ -57,4 +57,8 @@  struct xattr_handler {
 #define XATTR_CREATE	0x1
 #define XATTR_REPLACE	0x2
 
+/* xattr handler helpers - stubs for U-Boot */
+#define xattr_handler_can_list(h, d)	({ (void)(h); (void)(d); 0; })
+#define xattr_prefix(h)			({ (void)(h); (const char *)NULL; })
+
 #endif /* _LINUX_XATTR_H */