aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKemeng Shi <[email protected]>2023-06-03 23:03:19 +0800
committerTheodore Ts'o <[email protected]>2023-06-26 19:34:48 -0400
commit2ec6d0a5ea72689a79e6f725fd8b443a788ae279 (patch)
tree8ef20a25eefa31d251730d276e8d0a1bdcb9f533
parent247c3d214c23dfeeeb892e91a82ac1188bdaec9f (diff)
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: Kemeng Shi <[email protected]> Cc: [email protected] Reviewed-by: Ojaswin Mujoo <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Theodore Ts'o <[email protected]>
-rw-r--r--fs/ext4/mballoc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index 474aebfdc1dd..4322eb7559fc 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -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;
}