lkml.org 
[lkml]   [2023]   [Apr]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v3 11/19] ext4: fix wrong unit use in ext4_mb_new_blocks
Date
Function ext4_mb_new_blocks_simple needs count in cluster. Function
ext4_mb_new_blocks accepts count in block. Convert count to cluster
to fix the mismatch.

Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com>
---
fs/ext4/mballoc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index 4a345e3c1c78..6d4471fd3049 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -6315,7 +6315,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;
}

--
2.30.0
\
 
 \ /
  Last update: 2023-04-17 05:06    [W:0.171 / U:0.208 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site