hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/fs/ext4/sysfs.c
....@@ -487,6 +487,11 @@
487487 complete(&sbi->s_kobj_unregister);
488488 }
489489
490
+static void ext4_feat_release(struct kobject *kobj)
491
+{
492
+ kfree(kobj);
493
+}
494
+
490495 static const struct sysfs_ops ext4_attr_ops = {
491496 .show = ext4_attr_show,
492497 .store = ext4_attr_store,
....@@ -501,7 +506,7 @@
501506 static struct kobj_type ext4_feat_ktype = {
502507 .default_groups = ext4_feat_groups,
503508 .sysfs_ops = &ext4_attr_ops,
504
- .release = (void (*)(struct kobject *))kfree,
509
+ .release = ext4_feat_release,
505510 };
506511
507512 static struct kobject *ext4_root;
....@@ -534,6 +539,8 @@
534539 ext4_fc_info_show, sb);
535540 proc_create_seq_data("mb_groups", S_IRUGO, sbi->s_proc,
536541 &ext4_mb_seq_groups_ops, sb);
542
+ proc_create_single_data("mb_stats", 0444, sbi->s_proc,
543
+ ext4_seq_mb_stats_show, sb);
537544 }
538545 return 0;
539546 }