add patch return-hole-from-ext4_map_blocks
[ext4-patch-queue.git] / kill-ext4_mballoc_ready
blob61a107b52e928242fa57c06c0b01b4a526454377
1 ext4: kill ext4_mballoc_ready
3 From: Andreas Gruenbacher <agruenba@redhat.com>
5 This variable, introduced in commit 9c191f70, is unnecessary: it is set
6 once the module has been initialized correctly, and ext4_fill_super
7 cannot run unless the module has been initialized correctly.
9 Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
10 Signed-off-by: Jan Kara <jack@suse.cz>
11 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
12 ---
13  fs/ext4/super.c | 14 ++++----------
14  1 file changed, 4 insertions(+), 10 deletions(-)
16 diff --git a/fs/ext4/super.c b/fs/ext4/super.c
17 index ecc37e103435..2f550519e0aa 100644
18 --- a/fs/ext4/super.c
19 +++ b/fs/ext4/super.c
20 @@ -55,7 +55,6 @@
22  static struct ext4_lazy_init *ext4_li_info;
23  static struct mutex ext4_li_mtx;
24 -static int ext4_mballoc_ready;
25  static struct ratelimit_state ext4_mount_msg_ratelimit;
27  static int ext4_load_journal(struct super_block *, struct ext4_super_block *,
28 @@ -3795,12 +3794,10 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
29         sbi->s_journal->j_commit_callback = ext4_journal_commit_callback;
31  no_journal:
32 -       if (ext4_mballoc_ready) {
33 -               sbi->s_mb_cache = ext4_xattr_create_cache();
34 -               if (!sbi->s_mb_cache) {
35 -                       ext4_msg(sb, KERN_ERR, "Failed to create an mb_cache");
36 -                       goto failed_mount_wq;
37 -               }
38 +       sbi->s_mb_cache = ext4_xattr_create_cache();
39 +       if (!sbi->s_mb_cache) {
40 +               ext4_msg(sb, KERN_ERR, "Failed to create an mb_cache");
41 +               goto failed_mount_wq;
42         }
44         if ((DUMMY_ENCRYPTION_ENABLED(sbi) || ext4_has_feature_encrypt(sb)) &&
45 @@ -5361,8 +5358,6 @@ static int __init ext4_init_fs(void)
46         err = ext4_init_mballoc();
47         if (err)
48                 goto out2;
49 -       else
50 -               ext4_mballoc_ready = 1;
51         err = init_inodecache();
52         if (err)
53                 goto out1;
54 @@ -5378,7 +5373,6 @@ out:
55         unregister_as_ext3();
56         destroy_inodecache();
57  out1:
58 -       ext4_mballoc_ready = 0;
59         ext4_exit_mballoc();
60  out2:
61         ext4_exit_sysfs();
62 -- 
63 2.6.2