aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/ialloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ext4/ialloc.c')
-rw-r--r--fs/ext4/ialloc.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c
index 00a818d67b54..8bf5999875ee 100644
--- a/fs/ext4/ialloc.c
+++ b/fs/ext4/ialloc.c
@@ -734,11 +734,8 @@ repeat_in_this_group:
734 ino = ext4_find_next_zero_bit((unsigned long *) 734 ino = ext4_find_next_zero_bit((unsigned long *)
735 inode_bitmap_bh->b_data, 735 inode_bitmap_bh->b_data,
736 EXT4_INODES_PER_GROUP(sb), ino); 736 EXT4_INODES_PER_GROUP(sb), ino);
737 if (ino >= EXT4_INODES_PER_GROUP(sb)) { 737 if (ino >= EXT4_INODES_PER_GROUP(sb))
738 if (++group == ngroups) 738 goto next_group;
739 group = 0;
740 continue;
741 }
742 if (group == 0 && (ino+1) < EXT4_FIRST_INO(sb)) { 739 if (group == 0 && (ino+1) < EXT4_FIRST_INO(sb)) {
743 ext4_error(sb, "reserved inode found cleared - " 740 ext4_error(sb, "reserved inode found cleared - "
744 "inode=%lu", ino + 1); 741 "inode=%lu", ino + 1);
@@ -747,7 +744,8 @@ repeat_in_this_group:
747 if (!handle) { 744 if (!handle) {
748 BUG_ON(nblocks <= 0); 745 BUG_ON(nblocks <= 0);
749 handle = __ext4_journal_start_sb(dir->i_sb, line_no, 746 handle = __ext4_journal_start_sb(dir->i_sb, line_no,
750 handle_type, nblocks); 747 handle_type, nblocks,
748 0);
751 if (IS_ERR(handle)) { 749 if (IS_ERR(handle)) {
752 err = PTR_ERR(handle); 750 err = PTR_ERR(handle);
753 ext4_std_error(sb, err); 751 ext4_std_error(sb, err);
@@ -768,6 +766,9 @@ repeat_in_this_group:
768 goto got; /* we grabbed the inode! */ 766 goto got; /* we grabbed the inode! */
769 if (ino < EXT4_INODES_PER_GROUP(sb)) 767 if (ino < EXT4_INODES_PER_GROUP(sb))
770 goto repeat_in_this_group; 768 goto repeat_in_this_group;
769next_group:
770 if (++group == ngroups)
771 group = 0;
771 } 772 }
772 err = -ENOSPC; 773 err = -ENOSPC;
773 goto out; 774 goto out;