Commit 7dff55d2 authored by Yunlei He's avatar Yunlei He Committed by Jaegeuk Kim

f2fs: check node page again in write end io

Check node page again in write end io in case of
data corruption during inflght IO.
Signed-off-by: default avatarYunlei He <heyunlei@huawei.com>
Reviewed-by: default avatarChao Yu <yuchao0@huawei.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent 25a912e5
...@@ -114,6 +114,10 @@ static void f2fs_write_end_io(struct bio *bio) ...@@ -114,6 +114,10 @@ static void f2fs_write_end_io(struct bio *bio)
if (type == F2FS_WB_CP_DATA) if (type == F2FS_WB_CP_DATA)
f2fs_stop_checkpoint(sbi, true); f2fs_stop_checkpoint(sbi, true);
} }
f2fs_bug_on(sbi, page->mapping == NODE_MAPPING(sbi) &&
page->index != nid_of_node(page));
dec_page_count(sbi, type); dec_page_count(sbi, type);
clear_cold_data(page); clear_cold_data(page);
end_page_writeback(page); end_page_writeback(page);
......
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