summaryrefslogtreecommitdiff
path: root/fs/f2fs
diff options
context:
space:
mode:
authorYunlei He <heyunlei@huawei.com>2018-01-11 09:19:32 +0300
committerJaegeuk Kim <jaegeuk@kernel.org>2018-01-19 09:09:09 +0300
commit7dff55d27e07c571b6c532b714c22d7ce9fba1e0 (patch)
treeadfec05d6cd0edfe2cae49275057a88af781bfd0 /fs/f2fs
parent25a912e51af7c0761a6d3424640901ded517e201 (diff)
downloadlinux-7dff55d27e07c571b6c532b714c22d7ce9fba1e0.tar.xz
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: Yunlei He <heyunlei@huawei.com> Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs')
-rw-r--r--fs/f2fs/data.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index 304b899a6892..31add841ec39 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -114,6 +114,10 @@ static void f2fs_write_end_io(struct bio *bio)
if (type == F2FS_WB_CP_DATA)
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);
clear_cold_data(page);
end_page_writeback(page);