From 5445e42aced0d36237f5b306472ddc4afdf68f53 Mon Sep 17 00:00:00 2001 From: Daniel Rosenberg Date: Tue, 11 Feb 2025 13:36:52 -0800 Subject: [PATCH] ANDROID: fuse-bpf: Correct fuse bpf feature flag The feature flag should only advertise fuse-bpf if fuse-bpf is a supported feature Bug: 372951405 Test: Compile with CONFIG_FUSE_BPF unset Change-Id: I0049a3075f78576499168b8ebb6e833ccd18db0f Signed-off-by: Daniel Rosenberg --- fs/fuse/inode.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c index a765b0910d6b..ff8a45621cbd 100644 --- a/fs/fuse/inode.c +++ b/fs/fuse/inode.c @@ -2253,6 +2253,7 @@ static struct kobj_attribute fuse_passthrough_attr = __ATTR_RO(fuse_passthrough); #endif +#ifdef CONFIG_FUSE_BPF static ssize_t fuse_bpf_show(struct kobject *kobj, struct kobj_attribute *attr, char *buff) { @@ -2261,9 +2262,12 @@ static ssize_t fuse_bpf_show(struct kobject *kobj, static struct kobj_attribute fuse_bpf_attr = __ATTR_RO(fuse_bpf); +#endif static struct attribute *fuse_features[] = { +#ifdef CONFIG_FUSE_BPF &fuse_bpf_attr.attr, +#endif #ifdef CONFIG_FUSE_PASSTHROUGH &fuse_passthrough_attr.attr, #endif