diff options
Diffstat (limited to 'fs/ext4/super.c')
-rw-r--r-- | fs/ext4/super.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 26147746c272..0f0021f4990c 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c | |||
@@ -2568,6 +2568,8 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent) | |||
2568 | int err; | 2568 | int err; |
2569 | unsigned int journal_ioprio = DEFAULT_JOURNAL_IOPRIO; | 2569 | unsigned int journal_ioprio = DEFAULT_JOURNAL_IOPRIO; |
2570 | 2570 | ||
2571 | lock_kernel(); | ||
2572 | |||
2571 | sbi = kzalloc(sizeof(*sbi), GFP_KERNEL); | 2573 | sbi = kzalloc(sizeof(*sbi), GFP_KERNEL); |
2572 | if (!sbi) | 2574 | if (!sbi) |
2573 | goto out_free_orig; | 2575 | goto out_free_orig; |
@@ -3166,7 +3168,6 @@ no_journal: | |||
3166 | if (es->s_error_count) | 3168 | if (es->s_error_count) |
3167 | mod_timer(&sbi->s_err_report, jiffies + 300*HZ); /* 5 minutes */ | 3169 | mod_timer(&sbi->s_err_report, jiffies + 300*HZ); /* 5 minutes */ |
3168 | 3170 | ||
3169 | lock_kernel(); | ||
3170 | kfree(orig_data); | 3171 | kfree(orig_data); |
3171 | return 0; | 3172 | return 0; |
3172 | 3173 | ||
@@ -3213,8 +3214,11 @@ out_fail: | |||
3213 | sb->s_fs_info = NULL; | 3214 | sb->s_fs_info = NULL; |
3214 | kfree(sbi->s_blockgroup_lock); | 3215 | kfree(sbi->s_blockgroup_lock); |
3215 | kfree(sbi); | 3216 | kfree(sbi); |
3216 | lock_kernel(); | 3217 | kfree(orig_data); |
3218 | return ret; | ||
3219 | |||
3217 | out_free_orig: | 3220 | out_free_orig: |
3221 | unlock_kernel(); | ||
3218 | kfree(orig_data); | 3222 | kfree(orig_data); |
3219 | return ret; | 3223 | return ret; |
3220 | } | 3224 | } |