From: Kemeng Shi Date: Sat, 26 Aug 2023 17:47:05 +0000 (+0800) Subject: ext4: remove redundant check of count X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=7d4cd3b45af025befe3bca94f87359a6603b6e95;p=linux.git ext4: remove redundant check of count Remove zero check of count which is always non-zero. Signed-off-by: Kemeng Shi Reviewed-by: Theodore Ts'o Link: https://lore.kernel.org/r/20230826174712.4059355-7-shikemeng@huaweicloud.com Signed-off-by: Theodore Ts'o --- diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c index 5e4856d68c4aa..c51994e22af52 100644 --- a/fs/ext4/resize.c +++ b/fs/ext4/resize.c @@ -699,16 +699,14 @@ handle_ib: block = start; } - if (count) { - err = set_flexbg_block_bitmap(sb, handle, - flex_gd, - EXT4_B2C(sbi, start), - EXT4_B2C(sbi, - start + count - - 1)); - if (err) - goto out; - } + err = set_flexbg_block_bitmap(sb, handle, + flex_gd, + EXT4_B2C(sbi, start), + EXT4_B2C(sbi, + start + count + - 1)); + if (err) + goto out; } out: