From ea7caaa3064cc23e40572e8988da653804007369 Mon Sep 17 00:00:00 2001 From: Paul Lawrence Date: Wed, 14 Dec 2022 09:01:45 -0800 Subject: [PATCH] Revert "ANDROID: fuse-bpf: Add /sys/fs flags for fuse-bpf version" This reverts commit 2b6da462a157608e6c148ba55694a4a2df017a3c. Note that this change was reworked completely after being cherry-picked to 13-5.10, so revert this, then re-cherry-pick the version from 13-5.10 Bug: 202785178 Test: None (test with new version) Change-Id: Idbf470e93a56e2fe5f1fda164635f6f171c2d2fb Signed-off-by: Paul Lawrence --- fs/fuse/inode.c | 30 +----------------------------- include/uapi/linux/android_fuse.h | 3 --- 2 files changed, 1 insertion(+), 32 deletions(-) diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c index 031a86614049..dca4b42fad16 100644 --- a/fs/fuse/inode.c +++ b/fs/fuse/inode.c @@ -2027,45 +2027,17 @@ static void fuse_fs_cleanup(void) static struct kobject *fuse_kobj; -/* - * TODO Remove this once fuse-bpf is upstreamed - * - * The version numbers give us the ability to tune user mode behavior to the - * specific non-upstreamed version of fuse-bpf - * - * bpf_prog_type_fuse exports the bpf_prog_type_fuse 'constant', which cannot be - * constant until the code is upstreamed - */ -static ssize_t fuse_bpf_major_version_show(struct kobject *kobj, - struct kobj_attribute *attr, char *buff) -{ - return sysfs_emit(buff, "%d\n", FUSE_BPF_MAJOR_VERSION); -} - -static ssize_t fuse_bpf_minor_version_show(struct kobject *kobj, - struct kobj_attribute *attr, char *buff) -{ - return sysfs_emit(buff, "%d\n", FUSE_BPF_MINOR_VERSION); -} - +/* TODO Remove this once BPF_PROG_TYPE_FUSE is upstreamed */ static ssize_t bpf_prog_type_fuse_show(struct kobject *kobj, struct kobj_attribute *attr, char *buff) { return sysfs_emit(buff, "%d\n", BPF_PROG_TYPE_FUSE); } -static struct kobj_attribute fuse_bpf_major_version_attr = - __ATTR_RO(fuse_bpf_major_version); - -static struct kobj_attribute fuse_bpf_minor_version_attr = - __ATTR_RO(fuse_bpf_minor_version); - static struct kobj_attribute bpf_prog_type_fuse_attr = __ATTR_RO(bpf_prog_type_fuse); static struct attribute *bpf_attributes[] = { - &fuse_bpf_major_version_attr.attr, - &fuse_bpf_minor_version_attr.attr, &bpf_prog_type_fuse_attr.attr, NULL, }; diff --git a/include/uapi/linux/android_fuse.h b/include/uapi/linux/android_fuse.h index 488e893ffb89..221e30ea7f01 100644 --- a/include/uapi/linux/android_fuse.h +++ b/include/uapi/linux/android_fuse.h @@ -10,9 +10,6 @@ #include #endif -#define FUSE_BPF_MAJOR_VERSION 1 -#define FUSE_BPF_MINOR_VERSION 0 - #define FUSE_ACTION_KEEP 0 #define FUSE_ACTION_REMOVE 1 #define FUSE_ACTION_REPLACE 2