[Concept,14/21] ext4l: Add a CONFIG_EXT4_FS_POSIX_ACL option

Message ID 20260108185149.1995917-15-sjg@u-boot.org
State New
Headers
Series ext4l: Add Kconfig options to reduce binary size (part P) |

Commit Message

Simon Glass Jan. 8, 2026, 6:51 p.m. UTC
  From: Simon Glass <simon.glass@canonical.com>

Add Kconfig option to make POSIX ACL support optional. The acl.c and
acl.h files already have proper #ifdef CONFIG_EXT4_FS_POSIX_ACL guards
with stub functions when disabled.

ACLs require extended attributes, so this option depends on EXT4_XATTR.
It is unlikely to be useful in U-Boot but is included for completeness.

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

 fs/ext4l/Kconfig  | 11 +++++++++++
 fs/ext4l/Makefile |  1 +
 2 files changed, 12 insertions(+)
  

Patch

diff --git a/fs/ext4l/Kconfig b/fs/ext4l/Kconfig
index 22b290778b7..1dce08d9474 100644
--- a/fs/ext4l/Kconfig
+++ b/fs/ext4l/Kconfig
@@ -142,3 +142,14 @@  config EXT4_FAST_COMMIT_REPLAY
 	  created with -O ^fast_commit).
 
 	  If unsure, say Y.
+
+config EXT4_FS_POSIX_ACL
+	bool "Enable ext4 POSIX Access Control Lists"
+	depends on FS_EXT4L && EXT4_XATTR
+	help
+	  Enable POSIX Access Control Lists (ACLs) support for ext4
+	  filesystems. ACLs provide more fine-grained access control
+	  than the standard Unix permission model.
+
+	  ACLs require extended attributes support (EXT4_XATTR).
+	  If unsure, say N.
diff --git a/fs/ext4l/Makefile b/fs/ext4l/Makefile
index 85ddaaa104e..fd86ce56d2e 100644
--- a/fs/ext4l/Makefile
+++ b/fs/ext4l/Makefile
@@ -19,3 +19,4 @@  obj-$(CONFIG_EXT4_XATTR)	+= xattr.o xattr_hurd.o xattr_trusted.o \
 				   xattr_user.o
 obj-$(CONFIG_EXT4_INLINE_DATA)	+= inline.o
 obj-$(CONFIG_EXT4_INDIRECT)	+= indirect.o
+obj-$(CONFIG_EXT4_FS_POSIX_ACL)	+= acl.o