diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ext4/mballoc.c | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c index 2fcaf286f1de..cd258463e2a9 100644 --- a/fs/ext4/mballoc.c +++ b/fs/ext4/mballoc.c | |||
@@ -4227,14 +4227,9 @@ ext4_mb_initialize_context(struct ext4_allocation_context *ac, | |||
4227 | ext4_get_group_no_and_offset(sb, goal, &group, &block); | 4227 | ext4_get_group_no_and_offset(sb, goal, &group, &block); |
4228 | 4228 | ||
4229 | /* set up allocation goals */ | 4229 | /* set up allocation goals */ |
4230 | memset(ac, 0, sizeof(struct ext4_allocation_context)); | ||
4230 | ac->ac_b_ex.fe_logical = ar->logical; | 4231 | ac->ac_b_ex.fe_logical = ar->logical; |
4231 | ac->ac_b_ex.fe_group = 0; | ||
4232 | ac->ac_b_ex.fe_start = 0; | ||
4233 | ac->ac_b_ex.fe_len = 0; | ||
4234 | ac->ac_status = AC_STATUS_CONTINUE; | 4232 | ac->ac_status = AC_STATUS_CONTINUE; |
4235 | ac->ac_groups_scanned = 0; | ||
4236 | ac->ac_ex_scanned = 0; | ||
4237 | ac->ac_found = 0; | ||
4238 | ac->ac_sb = sb; | 4233 | ac->ac_sb = sb; |
4239 | ac->ac_inode = ar->inode; | 4234 | ac->ac_inode = ar->inode; |
4240 | ac->ac_o_ex.fe_logical = ar->logical; | 4235 | ac->ac_o_ex.fe_logical = ar->logical; |
@@ -4245,15 +4240,7 @@ ext4_mb_initialize_context(struct ext4_allocation_context *ac, | |||
4245 | ac->ac_g_ex.fe_group = group; | 4240 | ac->ac_g_ex.fe_group = group; |
4246 | ac->ac_g_ex.fe_start = block; | 4241 | ac->ac_g_ex.fe_start = block; |
4247 | ac->ac_g_ex.fe_len = len; | 4242 | ac->ac_g_ex.fe_len = len; |
4248 | ac->ac_f_ex.fe_len = 0; | ||
4249 | ac->ac_flags = ar->flags; | 4243 | ac->ac_flags = ar->flags; |
4250 | ac->ac_2order = 0; | ||
4251 | ac->ac_criteria = 0; | ||
4252 | ac->ac_pa = NULL; | ||
4253 | ac->ac_bitmap_page = NULL; | ||
4254 | ac->ac_buddy_page = NULL; | ||
4255 | ac->alloc_semp = NULL; | ||
4256 | ac->ac_lg = NULL; | ||
4257 | 4244 | ||
4258 | /* we have to define context: we'll we work with a file or | 4245 | /* we have to define context: we'll we work with a file or |
4259 | * locality group. this is a policy, actually */ | 4246 | * locality group. this is a policy, actually */ |
@@ -4521,10 +4508,7 @@ ext4_fsblk_t ext4_mb_new_blocks(handle_t *handle, | |||
4521 | } | 4508 | } |
4522 | 4509 | ||
4523 | ac = kmem_cache_alloc(ext4_ac_cachep, GFP_NOFS); | 4510 | ac = kmem_cache_alloc(ext4_ac_cachep, GFP_NOFS); |
4524 | if (ac) { | 4511 | if (!ac) { |
4525 | ac->ac_sb = sb; | ||
4526 | ac->ac_inode = ar->inode; | ||
4527 | } else { | ||
4528 | ar->len = 0; | 4512 | ar->len = 0; |
4529 | *errp = -ENOMEM; | 4513 | *errp = -ENOMEM; |
4530 | goto out1; | 4514 | goto out1; |