diff options
Diffstat (limited to 'fs/ext4/ialloc.c')
-rw-r--r-- | fs/ext4/ialloc.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c index 26154b81b836..fa36372f3fdf 100644 --- a/fs/ext4/ialloc.c +++ b/fs/ext4/ialloc.c | |||
@@ -697,6 +697,15 @@ got_group: | |||
697 | if (!gdp) | 697 | if (!gdp) |
698 | goto fail; | 698 | goto fail; |
699 | 699 | ||
700 | /* | ||
701 | * Check free inodes count before loading bitmap. | ||
702 | */ | ||
703 | if (ext4_free_inodes_count(sb, gdp) == 0) { | ||
704 | if (++group == ngroups) | ||
705 | group = 0; | ||
706 | continue; | ||
707 | } | ||
708 | |||
700 | brelse(inode_bitmap_bh); | 709 | brelse(inode_bitmap_bh); |
701 | inode_bitmap_bh = ext4_read_inode_bitmap(sb, group); | 710 | inode_bitmap_bh = ext4_read_inode_bitmap(sb, group); |
702 | if (!inode_bitmap_bh) | 711 | if (!inode_bitmap_bh) |