Skip to content

Commit

Permalink
ext4: remove useless conditional branch code
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
wuchi authored and Theodore Ts'o committed Apr 20, 2023
1 parent 8ae56b4 commit 17809d3
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions fs/ext4/bitmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,7 @@ int ext4_block_bitmap_csum_verify(struct super_block *sb,
} else
calculated &= 0xFFFF;

if (provided == calculated)
return 1;

return 0;
return provided == calculated;
}

void ext4_block_bitmap_csum_set(struct super_block *sb,
Expand Down

0 comments on commit 17809d3

Please sign in to comment.