Skip to content

Commit 17809d3

Browse files
ChiWu-Zerotytso
authored andcommitted
ext4: remove useless conditional branch code
It's ok because the code will be optimized by the compiler, just try to simple the code. Signed-off-by: wuchi <wuchi.zero@gmail.com> Reviewed-by: Jan Kara <jack@suse.cz> Link: https://lore.kernel.org/r/20230401075303.45206-1-wuchi.zero@gmail.com Signed-off-by: Theodore Ts'o <tytso@mit.edu>
1 parent 8ae56b4 commit 17809d3

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

fs/ext4/bitmap.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,7 @@ int ext4_block_bitmap_csum_verify(struct super_block *sb,
7474
} else
7575
calculated &= 0xFFFF;
7676

77-
if (provided == calculated)
78-
return 1;
79-
80-
return 0;
77+
return provided == calculated;
8178
}
8279

8380
void ext4_block_bitmap_csum_set(struct super_block *sb,

0 commit comments

Comments
 (0)