Skip to content

Commit

Permalink
ext4: Fix kernel BUG at fs/ext4/mballoc.c:910!
Browse files Browse the repository at this point in the history
With the flex_bg feature enabled, a large file creation oopses the
kernel.   The BUG_ON is:
	BUG_ON(len >= EXT4_BLOCKS_PER_GROUP(sb));

As the allocation of the bitmaps and the inode table can be done
outside the block group with flex_bg, this allows to allocate up to
EXT4_BLOCKS_PER_GROUP blocks in a group.

This patch fixes the oops.

Signed-off-by: Valerie Clement <valerie.clement@bull.net>
Signed-off-by: Mingming Cao <cmm@us.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
  • Loading branch information
Valerie Clement authored and Theodore Ts'o committed Feb 15, 2008
1 parent 55bd725 commit b73fce6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/ext4/mballoc.c
Original file line number Diff line number Diff line change
Expand Up @@ -906,7 +906,7 @@ static void ext4_mb_mark_free_simple(struct super_block *sb,
unsigned short chunk;
unsigned short border;

BUG_ON(len >= EXT4_BLOCKS_PER_GROUP(sb));
BUG_ON(len > EXT4_BLOCKS_PER_GROUP(sb));

border = 2 << sb->s_blocksize_bits;

Expand Down

0 comments on commit b73fce6

Please sign in to comment.