Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 273130
b: refs/heads/master
c: 7aa0bae
h: refs/heads/master
v: v3
  • Loading branch information
Tao Ma authored and Theodore Ts'o committed Oct 6, 2011
1 parent dbda91e commit 7c8baae
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5356f2615cd558c57a1f7d7528d1ad4de3640d96
refs/heads/master: 7aa0baeaba4afc4fbed7aad2812a1116e6b0adcd
23 changes: 15 additions & 8 deletions trunk/fs/ext4/mballoc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2504,7 +2504,7 @@ int ext4_mb_init(struct super_block *sb, int needs_recovery)
sbi->s_locality_groups = alloc_percpu(struct ext4_locality_group);
if (sbi->s_locality_groups == NULL) {
ret = -ENOMEM;
goto out;
goto out_free_groupinfo_slab;
}
for_each_possible_cpu(i) {
struct ext4_locality_group *lg;
Expand All @@ -2517,21 +2517,28 @@ int ext4_mb_init(struct super_block *sb, int needs_recovery)

/* init file for buddy data */
ret = ext4_mb_init_backend(sb);
if (ret != 0) {
goto out;
}
if (ret != 0)
goto out_free_locality_groups;

if (sbi->s_proc)
proc_create_data("mb_groups", S_IRUGO, sbi->s_proc,
&ext4_mb_seq_groups_fops, sb);

if (sbi->s_journal)
sbi->s_journal->j_commit_callback = release_blocks_on_commit;

return 0;

out_free_locality_groups:
free_percpu(sbi->s_locality_groups);
sbi->s_locality_groups = NULL;
out_free_groupinfo_slab:
ext4_groupinfo_destroy_slabs();
out:
if (ret) {
kfree(sbi->s_mb_offsets);
kfree(sbi->s_mb_maxs);
}
kfree(sbi->s_mb_offsets);
sbi->s_mb_offsets = NULL;
kfree(sbi->s_mb_maxs);
sbi->s_mb_maxs = NULL;
return ret;
}

Expand Down

0 comments on commit 7c8baae

Please sign in to comment.