ext4: fix unit mismatch in ext4_mb_new_blocks_simple
authorKemeng Shi <shikemeng@huaweicloud.com>
Sat, 3 Jun 2023 15:03:10 +0000 (23:03 +0800)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 15 Jun 2023 04:02:10 +0000 (00:02 -0400)
commit497885f72d930305d8e61b6b616b22b4da1adf90
treed7aa7a384f664f3bfa8b67346f0fdb8dba083563
parentb3916da0d9636285c8a881802956631f9e2ebb5b
ext4: fix unit mismatch in ext4_mb_new_blocks_simple

The "i" returned from mb_find_next_zero_bit is in cluster unit and we
need offset "block" corresponding to "i" in block unit. Convert "i" to
block unit to fix the unit mismatch.

Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com>
Reviewed-by: Ojaswin Mujoo <ojaswin@linux.ibm.com>
Link: https://lore.kernel.org/r/20230603150327.3596033-3-shikemeng@huaweicloud.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/mballoc.c