bcachefs: do not compile acl mod on minimal config
authorDan Robertson <dan@dlrobertson.com>
Sat, 5 Jun 2021 23:03:16 +0000 (19:03 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:05 +0000 (17:09 -0400)
Do not compile the acl.o target if BCACHEFS_POSIX_ACL is not enabled.

Signed-off-by: Dan Robertson <dan@dlrobertson.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/Makefile
fs/bcachefs/xattr.c

index dad2fe2530e56e62b93be4cc851f1de37355e5e5..af3b83f871dfaf0fbe141efc2d6cced5ee8c567f 100644 (file)
@@ -2,7 +2,6 @@
 obj-$(CONFIG_BCACHEFS_FS)      += bcachefs.o
 
 bcachefs-y             :=      \
-       acl.o                   \
        alloc_background.o      \
        alloc_foreground.o      \
        bkey.o                  \
@@ -59,3 +58,5 @@ bcachefs-y            :=      \
        util.o                  \
        varint.o                \
        xattr.o
+
+bcachefs-$(CONFIG_BCACHEFS_POSIX_ACL) += acl.o
index f18a795620d87e7095dac22e454e8121eb7cd369..1993bfcee788b80b6221b22ec964a9f1a2649ba0 100644 (file)
@@ -562,8 +562,10 @@ static const struct xattr_handler bch_xattr_bcachefs_effective_handler = {
 
 const struct xattr_handler *bch2_xattr_handlers[] = {
        &bch_xattr_user_handler,
+#ifdef CONFIG_BCACHEFS_POSIX_ACL
        &nop_posix_acl_access,
        &nop_posix_acl_default,
+#endif
        &bch_xattr_trusted_handler,
        &bch_xattr_security_handler,
 #ifndef NO_BCACHEFS_FS