Commit 2335d05f authored by Andreas Gruenbacher's avatar Andreas Gruenbacher Committed by Theodore Ts'o

ext4: kill ext4_mballoc_ready

This variable, introduced in commit 9c191f70, is unnecessary: it is set
once the module has been initialized correctly, and ext4_fill_super
cannot run unless the module has been initialized correctly.
Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: default avatarJan Kara <jack@suse.cz>
Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
parent 7a2508e1
...@@ -55,7 +55,6 @@ ...@@ -55,7 +55,6 @@
static struct ext4_lazy_init *ext4_li_info; static struct ext4_lazy_init *ext4_li_info;
static struct mutex ext4_li_mtx; static struct mutex ext4_li_mtx;
static int ext4_mballoc_ready;
static struct ratelimit_state ext4_mount_msg_ratelimit; static struct ratelimit_state ext4_mount_msg_ratelimit;
static int ext4_load_journal(struct super_block *, struct ext4_super_block *, static int ext4_load_journal(struct super_block *, struct ext4_super_block *,
...@@ -3795,12 +3794,10 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent) ...@@ -3795,12 +3794,10 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
sbi->s_journal->j_commit_callback = ext4_journal_commit_callback; sbi->s_journal->j_commit_callback = ext4_journal_commit_callback;
no_journal: no_journal:
if (ext4_mballoc_ready) { sbi->s_mb_cache = ext4_xattr_create_cache();
sbi->s_mb_cache = ext4_xattr_create_cache(); if (!sbi->s_mb_cache) {
if (!sbi->s_mb_cache) { ext4_msg(sb, KERN_ERR, "Failed to create an mb_cache");
ext4_msg(sb, KERN_ERR, "Failed to create an mb_cache"); goto failed_mount_wq;
goto failed_mount_wq;
}
} }
if ((DUMMY_ENCRYPTION_ENABLED(sbi) || ext4_has_feature_encrypt(sb)) && if ((DUMMY_ENCRYPTION_ENABLED(sbi) || ext4_has_feature_encrypt(sb)) &&
...@@ -5361,8 +5358,6 @@ static int __init ext4_init_fs(void) ...@@ -5361,8 +5358,6 @@ static int __init ext4_init_fs(void)
err = ext4_init_mballoc(); err = ext4_init_mballoc();
if (err) if (err)
goto out2; goto out2;
else
ext4_mballoc_ready = 1;
err = init_inodecache(); err = init_inodecache();
if (err) if (err)
goto out1; goto out1;
...@@ -5378,7 +5373,6 @@ static int __init ext4_init_fs(void) ...@@ -5378,7 +5373,6 @@ static int __init ext4_init_fs(void)
unregister_as_ext3(); unregister_as_ext3();
destroy_inodecache(); destroy_inodecache();
out1: out1:
ext4_mballoc_ready = 0;
ext4_exit_mballoc(); ext4_exit_mballoc();
out2: out2:
ext4_exit_sysfs(); ext4_exit_sysfs();
......
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