aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4
diff options
context:
space:
mode:
authorValerie Clement <valerie.clement@bull.net>2008-02-15 13:48:51 -0500
committerTheodore Ts'o <tytso@mit.edu>2008-02-15 13:48:51 -0500
commitb73fce69ecb091a178ef9286027c370a63eb25aa (patch)
tree6a9f4ea7eb731a85eb1bea20bd93cd7632ccdde6 /fs/ext4
parent55bd725aa3a83b3935988f37275b5a80e10d4169 (diff)
ext4: Fix kernel BUG at fs/ext4/mballoc.c:910!
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>
Diffstat (limited to 'fs/ext4')
-rw-r--r--fs/ext4/mballoc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index dd0fcfcb35ce..2121184a3fa5 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -906,7 +906,7 @@ static void ext4_mb_mark_free_simple(struct super_block *sb,
906 unsigned short chunk; 906 unsigned short chunk;
907 unsigned short border; 907 unsigned short border;
908 908
909 BUG_ON(len >= EXT4_BLOCKS_PER_GROUP(sb)); 909 BUG_ON(len > EXT4_BLOCKS_PER_GROUP(sb));
910 910
911 border = 2 << sb->s_blocksize_bits; 911 border = 2 << sb->s_blocksize_bits;
912 912