aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/super.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ext4/super.c')
-rw-r--r--fs/ext4/super.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 3d8cf2cab379..4898cb1ff606 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -4769,7 +4769,7 @@ static struct file_system_type ext4_fs_type = {
4769 .fs_flags = FS_REQUIRES_DEV, 4769 .fs_flags = FS_REQUIRES_DEV,
4770}; 4770};
4771 4771
4772int __init ext4_init_feat_adverts(void) 4772static int __init ext4_init_feat_adverts(void)
4773{ 4773{
4774 struct ext4_features *ef; 4774 struct ext4_features *ef;
4775 int ret = -ENOMEM; 4775 int ret = -ENOMEM;
@@ -4793,6 +4793,13 @@ out:
4793 return ret; 4793 return ret;
4794} 4794}
4795 4795
4796static void ext4_exit_feat_adverts(void)
4797{
4798 kobject_put(&ext4_feat->f_kobj);
4799 wait_for_completion(&ext4_feat->f_kobj_unregister);
4800 kfree(ext4_feat);
4801}
4802
4796static int __init ext4_init_fs(void) 4803static int __init ext4_init_fs(void)
4797{ 4804{
4798 int err; 4805 int err;
@@ -4839,7 +4846,7 @@ out1:
4839out2: 4846out2:
4840 ext4_exit_mballoc(); 4847 ext4_exit_mballoc();
4841out3: 4848out3:
4842 kfree(ext4_feat); 4849 ext4_exit_feat_adverts();
4843 remove_proc_entry("fs/ext4", NULL); 4850 remove_proc_entry("fs/ext4", NULL);
4844 kset_unregister(ext4_kset); 4851 kset_unregister(ext4_kset);
4845out4: 4852out4:
@@ -4858,6 +4865,7 @@ static void __exit ext4_exit_fs(void)
4858 destroy_inodecache(); 4865 destroy_inodecache();
4859 ext4_exit_xattr(); 4866 ext4_exit_xattr();
4860 ext4_exit_mballoc(); 4867 ext4_exit_mballoc();
4868 ext4_exit_feat_adverts();
4861 remove_proc_entry("fs/ext4", NULL); 4869 remove_proc_entry("fs/ext4", NULL);
4862 kset_unregister(ext4_kset); 4870 kset_unregister(ext4_kset);
4863 ext4_exit_system_zone(); 4871 ext4_exit_system_zone();