diff options
| author | Andreas Gruenbacher <agruenba@redhat.com> | 2016-02-22 22:41:05 -0500 |
|---|---|---|
| committer | Theodore Ts'o <tytso@mit.edu> | 2016-02-22 22:41:05 -0500 |
| commit | 2335d05f3a83f5290ec28c1ed30c1c742a37edc9 (patch) | |
| tree | 5f2add503449ccbb9c955b7855d605f22b3a7e29 | |
| parent | 7a2508e1b657cfc7e1371550f88c7a7bc4288f32 (diff) | |
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: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
| -rw-r--r-- | fs/ext4/super.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index ecc37e103435..2f550519e0aa 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c | |||
| @@ -55,7 +55,6 @@ | |||
| 55 | 55 | ||
| 56 | static struct ext4_lazy_init *ext4_li_info; | 56 | static struct ext4_lazy_init *ext4_li_info; |
| 57 | static struct mutex ext4_li_mtx; | 57 | static struct mutex ext4_li_mtx; |
| 58 | static int ext4_mballoc_ready; | ||
| 59 | static struct ratelimit_state ext4_mount_msg_ratelimit; | 58 | static struct ratelimit_state ext4_mount_msg_ratelimit; |
| 60 | 59 | ||
| 61 | static int ext4_load_journal(struct super_block *, struct ext4_super_block *, | 60 | 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 | sbi->s_journal->j_commit_callback = ext4_journal_commit_callback; | 3794 | sbi->s_journal->j_commit_callback = ext4_journal_commit_callback; |
| 3796 | 3795 | ||
| 3797 | no_journal: | 3796 | no_journal: |
| 3798 | if (ext4_mballoc_ready) { | 3797 | sbi->s_mb_cache = ext4_xattr_create_cache(); |
| 3799 | sbi->s_mb_cache = ext4_xattr_create_cache(); | 3798 | if (!sbi->s_mb_cache) { |
| 3800 | if (!sbi->s_mb_cache) { | 3799 | ext4_msg(sb, KERN_ERR, "Failed to create an mb_cache"); |
| 3801 | ext4_msg(sb, KERN_ERR, "Failed to create an mb_cache"); | 3800 | goto failed_mount_wq; |
| 3802 | goto failed_mount_wq; | ||
| 3803 | } | ||
| 3804 | } | 3801 | } |
| 3805 | 3802 | ||
| 3806 | if ((DUMMY_ENCRYPTION_ENABLED(sbi) || ext4_has_feature_encrypt(sb)) && | 3803 | if ((DUMMY_ENCRYPTION_ENABLED(sbi) || ext4_has_feature_encrypt(sb)) && |
| @@ -5361,8 +5358,6 @@ static int __init ext4_init_fs(void) | |||
| 5361 | err = ext4_init_mballoc(); | 5358 | err = ext4_init_mballoc(); |
| 5362 | if (err) | 5359 | if (err) |
| 5363 | goto out2; | 5360 | goto out2; |
| 5364 | else | ||
| 5365 | ext4_mballoc_ready = 1; | ||
| 5366 | err = init_inodecache(); | 5361 | err = init_inodecache(); |
| 5367 | if (err) | 5362 | if (err) |
| 5368 | goto out1; | 5363 | goto out1; |
| @@ -5378,7 +5373,6 @@ out: | |||
| 5378 | unregister_as_ext3(); | 5373 | unregister_as_ext3(); |
| 5379 | destroy_inodecache(); | 5374 | destroy_inodecache(); |
| 5380 | out1: | 5375 | out1: |
| 5381 | ext4_mballoc_ready = 0; | ||
| 5382 | ext4_exit_mballoc(); | 5376 | ext4_exit_mballoc(); |
| 5383 | out2: | 5377 | out2: |
| 5384 | ext4_exit_sysfs(); | 5378 | ext4_exit_sysfs(); |
