Commit 71e8978e authored by Dennis Zhou's avatar Dennis Zhou Committed by David Sterba

btrfs: sysfs: add removal calls for debug/

We probably should call sysfs_remove_group() on debug/.
Reviewed-by: default avatarJosef Bacik <josef@toxicpanda.com>
Reviewed-by: default avatarAnand Jain <anand.jain@oracle.com>
Signed-off-by: default avatarDennis Zhou <dennis@kernel.org>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 2bee7eb8
...@@ -771,6 +771,10 @@ void btrfs_sysfs_remove_mounted(struct btrfs_fs_info *fs_info) ...@@ -771,6 +771,10 @@ void btrfs_sysfs_remove_mounted(struct btrfs_fs_info *fs_info)
kobject_del(fs_info->space_info_kobj); kobject_del(fs_info->space_info_kobj);
kobject_put(fs_info->space_info_kobj); kobject_put(fs_info->space_info_kobj);
} }
#ifdef CONFIG_BTRFS_DEBUG
sysfs_remove_group(&fs_info->fs_devices->fsid_kobj,
&btrfs_debug_feature_attr_group);
#endif
addrm_unknown_feature_attrs(fs_info, false); addrm_unknown_feature_attrs(fs_info, false);
sysfs_remove_group(&fs_info->fs_devices->fsid_kobj, &btrfs_feature_attr_group); sysfs_remove_group(&fs_info->fs_devices->fsid_kobj, &btrfs_feature_attr_group);
sysfs_remove_files(&fs_info->fs_devices->fsid_kobj, btrfs_attrs); sysfs_remove_files(&fs_info->fs_devices->fsid_kobj, btrfs_attrs);
...@@ -1205,6 +1209,9 @@ void __cold btrfs_exit_sysfs(void) ...@@ -1205,6 +1209,9 @@ void __cold btrfs_exit_sysfs(void)
sysfs_unmerge_group(&btrfs_kset->kobj, sysfs_unmerge_group(&btrfs_kset->kobj,
&btrfs_static_feature_attr_group); &btrfs_static_feature_attr_group);
sysfs_remove_group(&btrfs_kset->kobj, &btrfs_feature_attr_group); sysfs_remove_group(&btrfs_kset->kobj, &btrfs_feature_attr_group);
#ifdef CONFIG_BTRFS_DEBUG
sysfs_remove_group(&btrfs_kset->kobj, &btrfs_debug_feature_attr_group);
#endif
kset_unregister(btrfs_kset); kset_unregister(btrfs_kset);
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment