Check node page again in write end io in case of
data corruption during inflght IO.

Signed-off-by: Yunlei He <[email protected]>
---
 fs/f2fs/data.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index 72d5d36..d9246a8 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -114,6 +114,11 @@ static void f2fs_write_end_io(struct bio *bio)
                        if (type == F2FS_WB_CP_DATA)
                                f2fs_stop_checkpoint(sbi, true);
                }
+
+               if (page->mapping == NODE_MAPPING(sbi) &&
+                                       page->index != nid_of_node(page))
+                       f2fs_bug_on(sbi, 1);
+
                dec_page_count(sbi, type);
                clear_cold_data(page);
                end_page_writeback(page);
-- 
1.9.1


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Reply via email to