From 1c9bc1da8e3dbf68601aeefa3a73ba803099b97b Mon Sep 17 00:00:00 2001 From: Daniel Rosenberg Date: Tue, 11 Feb 2025 13:36:52 -0800 Subject: [PATCH] UPSTREAM: 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 8488a862f4da..39d9d531c965 100644 --- a/fs/fuse/inode.c +++ b/fs/fuse/inode.c @@ -1884,6 +1884,7 @@ static void fuse_fs_cleanup(void) static struct kobject *fuse_kobj; +#ifdef CONFIG_FUSE_BPF static ssize_t fuse_bpf_show(struct kobject *kobj, struct kobj_attribute *attr, char *buff) { @@ -1892,9 +1893,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 *bpf_features[] = { +#ifdef CONFIG_FUSE_BPF &fuse_bpf_attr.attr, +#endif NULL, };