diff options
-rw-r--r-- | fs/ext4/super.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index ff889e1f11d5..2766b8eba121 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c | |||
@@ -2754,9 +2754,25 @@ static void ext4_feat_release(struct kobject *kobj) | |||
2754 | complete(&ext4_feat->f_kobj_unregister); | 2754 | complete(&ext4_feat->f_kobj_unregister); |
2755 | } | 2755 | } |
2756 | 2756 | ||
2757 | static ssize_t ext4_feat_show(struct kobject *kobj, | ||
2758 | struct attribute *attr, char *buf) | ||
2759 | { | ||
2760 | return snprintf(buf, PAGE_SIZE, "supported\n"); | ||
2761 | } | ||
2762 | |||
2763 | /* | ||
2764 | * We can not use ext4_attr_show/store because it relies on the kobject | ||
2765 | * being embedded in the ext4_sb_info structure which is definitely not | ||
2766 | * true in this case. | ||
2767 | */ | ||
2768 | static const struct sysfs_ops ext4_feat_ops = { | ||
2769 | .show = ext4_feat_show, | ||
2770 | .store = NULL, | ||
2771 | }; | ||
2772 | |||
2757 | static struct kobj_type ext4_feat_ktype = { | 2773 | static struct kobj_type ext4_feat_ktype = { |
2758 | .default_attrs = ext4_feat_attrs, | 2774 | .default_attrs = ext4_feat_attrs, |
2759 | .sysfs_ops = &ext4_attr_ops, | 2775 | .sysfs_ops = &ext4_feat_ops, |
2760 | .release = ext4_feat_release, | 2776 | .release = ext4_feat_release, |
2761 | }; | 2777 | }; |
2762 | 2778 | ||