If the written page was mapped more than twice, the written data here will not be seen by others. We add the flush_dcache_page to fix it.
Fixes:0a2aa8fbb9693 ("f2fs: refactor __exchange_data_block for speed up") Signed-off-by: Zhang Qilong <zhangqilo...@huawei.com> --- fs/f2fs/file.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index ab9844eaa62c..b593e41dbfb3 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -1273,6 +1273,7 @@ static int __clone_blkaddrs(struct inode *src_inode, struct inode *dst_inode, return PTR_ERR(pdst); } memcpy_page(pdst, 0, psrc, 0, PAGE_SIZE); + flush_dcache_page(pdst); set_page_dirty(pdst); f2fs_put_page(pdst, 1); f2fs_put_page(psrc, 1); -- 2.25.1 _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel