summaryrefslogtreecommitdiffstats
path: root/fs/ext4
diff options
context:
space:
mode:
authorKemeng Shi <shikemeng@huaweicloud.com>2024-08-20 21:22:31 +0800
committerTheodore Ts'o <tytso@mit.edu>2024-09-03 22:12:15 -0400
commitf7c69be505a5ec3df13b65cedb245343b2a5f751 (patch)
tree6fdf40d29879070ec59c5590e5a1baa5a0854b4c /fs/ext4
parentbb0a12c3439b10d88412fd3102df5b9a6e3cd6dc (diff)
downloadlinux-f7c69be505a5ec3df13b65cedb245343b2a5f751.tar.gz
linux-f7c69be505a5ec3df13b65cedb245343b2a5f751.tar.bz2
linux-f7c69be505a5ec3df13b65cedb245343b2a5f751.zip
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 <shikemeng@huaweicloud.com> Link: https://patch.msgid.link/20240820132234.2759926-5-shikemeng@huaweicloud.com Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4')
-rw-r--r--fs/ext4/ialloc.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c
index 81641be38c0e..8ee4754c70f5 100644
--- a/fs/ext4/ialloc.c
+++ b/fs/ext4/ialloc.c
@@ -1064,7 +1064,6 @@ got_group:
EXT4_MB_GRP_IBITMAP_CORRUPT(grp))
goto next_group;
-repeat_in_this_group:
ret2 = find_inode_bit(sb, group, inode_bitmap_bh, &ino);
if (!ret2)
goto next_group;
@@ -1114,8 +1113,6 @@ repeat_in_this_group:
if (!ret2)
goto got; /* we grabbed the inode! */
- if (ino < EXT4_INODES_PER_GROUP(sb))
- goto repeat_in_this_group;
next_group:
if (++group == ngroups)
group = 0;