Commit 9249dded authored by Qiuyang Sun's avatar Qiuyang Sun Committed by Jaegeuk Kim

f2fs: fix block address for __check_sit_bitmap

Should use lstart (logical start address) instead of start (in dev) here.
This fixes a bug in multi-device scenarios.
Signed-off-by: default avatarQiuyang Sun <sunqiuyang@huawei.com>
Reviewed-by: default avatarChao Yu <yuchao0@huawei.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent e4589fa5
...@@ -1151,7 +1151,7 @@ static int __submit_discard_cmd(struct f2fs_sb_info *sbi, ...@@ -1151,7 +1151,7 @@ static int __submit_discard_cmd(struct f2fs_sb_info *sbi,
list_move_tail(&dc->list, wait_list); list_move_tail(&dc->list, wait_list);
/* sanity check on discard range */ /* sanity check on discard range */
__check_sit_bitmap(sbi, start, start + len); __check_sit_bitmap(sbi, lstart, lstart + len);
bio->bi_private = dc; bio->bi_private = dc;
bio->bi_end_io = f2fs_submit_discard_endio; bio->bi_end_io = f2fs_submit_discard_endio;
......
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