summaryrefslogtreecommitdiff
path: root/fs/ext4
diff options
context:
space:
mode:
authorKemeng Shi <shikemeng@huaweicloud.com>2023-08-26 20:47:12 +0300
committerTheodore Ts'o <tytso@mit.edu>2023-10-06 05:32:15 +0300
commit248b45b621a77155f81129e6b572ec833edb4cf4 (patch)
tree4495a0f8f6ec24afc06f93fd56974ab75e88dd04 /fs/ext4
parent350bb48b84b8f4ad4ea179dbb97f568d12626188 (diff)
downloadlinux-248b45b621a77155f81129e6b572ec833edb4cf4.tar.xz
ext4: remove unnecessary initialization of count2 in set_flexbg_block_bitmap
We always overwrite count2 to "EXT4_CLUSTERS_PER_GROUP(sb) - (first_cluster - start)" after its initialization in for loop initialization statement . Just remove unnecessary initialization of count2. Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com> Reviewed-by: Theodore Ts'o <tytso@mit.edu> Link: https://lore.kernel.org/r/20230826174712.4059355-14-shikemeng@huaweicloud.com Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4')
-rw-r--r--fs/ext4/resize.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c
index 718b47e131e4..4fe061edefdd 100644
--- a/fs/ext4/resize.c
+++ b/fs/ext4/resize.c
@@ -447,8 +447,7 @@ static int set_flexbg_block_bitmap(struct super_block *sb, handle_t *handle,
ext4_debug("mark clusters [%llu-%llu] used\n", first_cluster,
last_cluster);
- for (count2 = count; count > 0;
- count -= count2, first_cluster += count2) {
+ for (; count > 0; count -= count2, first_cluster += count2) {
ext4_fsblk_t start;
struct buffer_head *bh;
ext4_group_t group;