diff options
| author | Yunlei He <heyunlei@huawei.com> | 2018-01-11 14:19:32 +0800 |
|---|---|---|
| committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2018-02-07 18:05:53 -0800 |
| commit | 10f4a4140b618ea89740dd76ff47aedbd5161f84 (patch) | |
| tree | 79cd7e3aeecf1c084036562b7140e8587ed583aa | |
| parent | b203c58dfd5538d1a7f99737db6d3653b7601c82 (diff) | |
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>
| -rw-r--r-- | fs/f2fs/data.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 8148dff3732e..bbb6eb79351f 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -113,6 +113,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); |
