Skip to content

Commit f7c69be

Browse files
Kemeng Shitytso
authored andcommitted
ext4: remove dead check in __ext4_new_inode()
If we can't grab any inode, the prvious find_inode_bit() will set ino to be >= EXT4_INODES_PER_GROUP(sb). So the check of need to repeat in the same group is not needed. Signed-off-by: Kemeng Shi <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Theodore Ts'o <[email protected]>
1 parent bb0a12c commit f7c69be

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

fs/ext4/ialloc.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1064,7 +1064,6 @@ struct inode *__ext4_new_inode(struct mnt_idmap *idmap,
10641064
EXT4_MB_GRP_IBITMAP_CORRUPT(grp))
10651065
goto next_group;
10661066

1067-
repeat_in_this_group:
10681067
ret2 = find_inode_bit(sb, group, inode_bitmap_bh, &ino);
10691068
if (!ret2)
10701069
goto next_group;
@@ -1114,8 +1113,6 @@ struct inode *__ext4_new_inode(struct mnt_idmap *idmap,
11141113
if (!ret2)
11151114
goto got; /* we grabbed the inode! */
11161115

1117-
if (ino < EXT4_INODES_PER_GROUP(sb))
1118-
goto repeat_in_this_group;
11191116
next_group:
11201117
if (++group == ngroups)
11211118
group = 0;

0 commit comments

Comments
 (0)