Commit d44651d0 authored by Fabrice Jouhaud's avatar Fabrice Jouhaud Committed by Theodore Ts'o

ext4: fix ext4 so it works without CONFIG_PROC_FS

This fixes a bug which was introduced in dd68314c.  The problem
came from the test of the return value of proc_mkdir which is always
false without procfs, and this would initialization of ext4.
Signed-off-by: default avatarFabrice Jouhaud <yargil@free.fr>
Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
parent 6ee3b212
...@@ -3540,10 +3540,8 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent) ...@@ -3540,10 +3540,8 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
goto failed_mount; goto failed_mount;
} }
#ifdef CONFIG_PROC_FS
if (ext4_proc_root) if (ext4_proc_root)
sbi->s_proc = proc_mkdir(sb->s_id, ext4_proc_root); sbi->s_proc = proc_mkdir(sb->s_id, ext4_proc_root);
#endif
bgl_lock_init(sbi->s_blockgroup_lock); bgl_lock_init(sbi->s_blockgroup_lock);
...@@ -5070,13 +5068,11 @@ static int __init ext4_init_fs(void) ...@@ -5070,13 +5068,11 @@ static int __init ext4_init_fs(void)
return err; return err;
err = ext4_init_system_zone(); err = ext4_init_system_zone();
if (err) if (err)
goto out7; goto out6;
ext4_kset = kset_create_and_add("ext4", NULL, fs_kobj); ext4_kset = kset_create_and_add("ext4", NULL, fs_kobj);
if (!ext4_kset) if (!ext4_kset)
goto out6;
ext4_proc_root = proc_mkdir("fs/ext4", NULL);
if (!ext4_proc_root)
goto out5; goto out5;
ext4_proc_root = proc_mkdir("fs/ext4", NULL);
err = ext4_init_feat_adverts(); err = ext4_init_feat_adverts();
if (err) if (err)
...@@ -5112,12 +5108,12 @@ static int __init ext4_init_fs(void) ...@@ -5112,12 +5108,12 @@ static int __init ext4_init_fs(void)
out3: out3:
ext4_exit_feat_adverts(); ext4_exit_feat_adverts();
out4: out4:
if (ext4_proc_root)
remove_proc_entry("fs/ext4", NULL); remove_proc_entry("fs/ext4", NULL);
out5:
kset_unregister(ext4_kset); kset_unregister(ext4_kset);
out6: out5:
ext4_exit_system_zone(); ext4_exit_system_zone();
out7: out6:
ext4_exit_pageio(); ext4_exit_pageio();
return err; return err;
} }
......
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