projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bb0a12c
)
ext4: remove dead check in __ext4_new_inode()
author
Kemeng Shi
<shikemeng@huaweicloud.com>
Tue, 20 Aug 2024 13:22:31 +0000
(21:22 +0800)
committer
Theodore Ts'o
<tytso@mit.edu>
Wed, 4 Sep 2024 02:12:15 +0000
(22:12 -0400)
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>
fs/ext4/ialloc.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/ext4/ialloc.c
b/fs/ext4/ialloc.c
index 81641be38c0e8b7933ff24e9117fdfbce14a2750..8ee4754c70f56830d0631a2a584fc38f6d67f404 100644
(file)
--- 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;