Commit 75491eae authored by Qiuyang Sun's avatar Qiuyang Sun Committed by Greg Kroah-Hartman

f2fs: fix block address for __check_sit_bitmap

[ Upstream commit 9249dded ]

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>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent bb76fe3f
......@@ -1103,7 +1103,7 @@ static int __submit_discard_cmd(struct f2fs_sb_info *sbi,
list_move_tail(&dc->list, wait_list);
/* 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_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