From 59e2480ff7360b5c6ecd418aee795a7087a3e8f6 Mon Sep 17 00:00:00 2001 From: Dan Robertson Date: Sat, 5 Jun 2021 19:03:16 -0400 Subject: [PATCH] bcachefs: do not compile acl mod on minimal config Do not compile the acl.o target if BCACHEFS_POSIX_ACL is not enabled. Signed-off-by: Dan Robertson Signed-off-by: Kent Overstreet --- fs/bcachefs/Makefile | 3 ++- fs/bcachefs/xattr.c | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/fs/bcachefs/Makefile b/fs/bcachefs/Makefile index dad2fe2530e56..af3b83f871dfa 100644 --- a/fs/bcachefs/Makefile +++ b/fs/bcachefs/Makefile @@ -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 diff --git a/fs/bcachefs/xattr.c b/fs/bcachefs/xattr.c index f18a795620d87..1993bfcee788b 100644 --- a/fs/bcachefs/xattr.c +++ b/fs/bcachefs/xattr.c @@ -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 -- 2.30.2