diff options
author | Kemeng Shi <[email protected]> | 2023-06-03 23:03:18 +0800 |
---|---|---|
committer | Theodore Ts'o <[email protected]> | 2023-06-26 19:34:36 -0400 |
commit | 247c3d214c23dfeeeb892e91a82ac1188bdaec9f (patch) | |
tree | 30c0ee9f026da9fc54181dc586eb2c9e6cdcc68a | |
parent | ad78b5efe4246e5deba8d44a6ed172b8a00d3113 (diff) |
ext4: fix wrong unit use in ext4_mb_clear_bb
Function ext4_issue_discard need count in cluster. Pass count_clusters
instead of count 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.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c index 1345c4e84cc3..474aebfdc1dd 100644 --- a/fs/ext4/mballoc.c +++ b/fs/ext4/mballoc.c @@ -6280,8 +6280,8 @@ do_more: * them with group lock_held */ if (test_opt(sb, DISCARD)) { - err = ext4_issue_discard(sb, block_group, bit, count, - NULL); + err = ext4_issue_discard(sb, block_group, bit, + count_clusters, NULL); if (err && err != -EOPNOTSUPP) ext4_msg(sb, KERN_WARNING, "discard request in" " group:%u block:%d count:%lu failed" |