diff options
Diffstat (limited to 'fs/ext2/ialloc.c')
-rw-r--r-- | fs/ext2/ialloc.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/ext2/ialloc.c b/fs/ext2/ialloc.c index efe5fb21c533..04e73a99902b 100644 --- a/fs/ext2/ialloc.c +++ b/fs/ext2/ialloc.c | |||
@@ -465,6 +465,11 @@ struct inode *ext2_new_inode(struct inode *dir, umode_t mode, | |||
465 | 465 | ||
466 | for (i = 0; i < sbi->s_groups_count; i++) { | 466 | for (i = 0; i < sbi->s_groups_count; i++) { |
467 | gdp = ext2_get_group_desc(sb, group, &bh2); | 467 | gdp = ext2_get_group_desc(sb, group, &bh2); |
468 | if (!gdp) { | ||
469 | if (++group == sbi->s_groups_count) | ||
470 | group = 0; | ||
471 | continue; | ||
472 | } | ||
468 | brelse(bitmap_bh); | 473 | brelse(bitmap_bh); |
469 | bitmap_bh = read_inode_bitmap(sb, group); | 474 | bitmap_bh = read_inode_bitmap(sb, group); |
470 | if (!bitmap_bh) { | 475 | if (!bitmap_bh) { |