Commit 2ec6d0a5 authored by Kemeng Shi's avatar Kemeng Shi Committed by Theodore Ts'o

ext4: fix wrong unit use in ext4_mb_new_blocks

Function ext4_free_blocks_simple needs count in cluster. Function
ext4_free_blocks accepts count in block. Convert count to cluster
to fix the mismatch.
Signed-off-by: default avatarKemeng Shi <shikemeng@huaweicloud.com>
Cc: stable@kernel.org
Reviewed-by: default avatarOjaswin Mujoo <ojaswin@linux.ibm.com>
Link: https://lore.kernel.org/r/20230603150327.3596033-12-shikemeng@huaweicloud.comSigned-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
parent 247c3d21
......@@ -6373,7 +6373,7 @@ void ext4_free_blocks(handle_t *handle, struct inode *inode,
}
if (sbi->s_mount_state & EXT4_FC_REPLAY) {
ext4_free_blocks_simple(inode, block, count);
ext4_free_blocks_simple(inode, block, EXT4_NUM_B2C(sbi, count));
return;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment