Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 331594
b: refs/heads/master
c: f2a09af
h: refs/heads/master
v: v3
  • Loading branch information
Yongqiang Yang authored and Theodore Ts'o committed Sep 24, 2012
1 parent 094b965 commit ae53e96
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 838cd0cf9af52e034ee81513642083bbe8e4ddb1
refs/heads/master: f2a09af645b762f8230e7eba7fee3b6f7e6e96e7
9 changes: 9 additions & 0 deletions trunk/fs/ext4/ialloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit ae53e96

Please sign in to comment.