diff --git a/[refs] b/[refs] index 9df4c9549253..a3108c390bdf 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 838cd0cf9af52e034ee81513642083bbe8e4ddb1 +refs/heads/master: f2a09af645b762f8230e7eba7fee3b6f7e6e96e7 diff --git a/trunk/fs/ext4/ialloc.c b/trunk/fs/ext4/ialloc.c index 26154b81b836..fa36372f3fdf 100644 --- a/trunk/fs/ext4/ialloc.c +++ b/trunk/fs/ext4/ialloc.c @@ -697,6 +697,15 @@ struct inode *ext4_new_inode(handle_t *handle, struct inode *dir, umode_t mode, if (!gdp) goto fail; + /* + * Check free inodes count before loading bitmap. + */ + if (ext4_free_inodes_count(sb, gdp) == 0) { + if (++group == ngroups) + group = 0; + continue; + } + brelse(inode_bitmap_bh); inode_bitmap_bh = ext4_read_inode_bitmap(sb, group); if (!inode_bitmap_bh)