Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 331557
b: refs/heads/master
c: 01fc48e
h: refs/heads/master
i:
  331555: 3b4672c
v: v3
  • Loading branch information
Theodore Ts'o committed Aug 17, 2012
1 parent b6ace4b commit d919d83
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 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: ecb94f5fdf4b72547fca022421a9dca1672bddd4
refs/heads/master: 01fc48e8929e45e67527200017cff4e74e4ba054
9 changes: 6 additions & 3 deletions trunk/fs/ext4/mballoc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1862,17 +1862,20 @@ static int ext4_mb_good_group(struct ext4_allocation_context *ac,

BUG_ON(cr < 0 || cr >= 4);

free = grp->bb_free;
if (free == 0)
return 0;
if (cr <= 2 && free < ac->ac_g_ex.fe_len)
return 0;

/* We only do this if the grp has never been initialized */
if (unlikely(EXT4_MB_GRP_NEED_INIT(grp))) {
int ret = ext4_mb_init_group(ac->ac_sb, group);
if (ret)
return 0;
}

free = grp->bb_free;
fragments = grp->bb_fragments;
if (free == 0)
return 0;
if (fragments == 0)
return 0;

Expand Down

0 comments on commit d919d83

Please sign in to comment.