From: Chao Yu Date: Mon, 23 Apr 2018 02:36:13 +0000 (+0800) Subject: f2fs: fix to wait page writeback during revoking atomic write X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=570f12a8b651e45a0af48cced6c54c571e5bb328;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git f2fs: fix to wait page writeback during revoking atomic write [ Upstream commit e5e5732d8120654159254c16834bc8663d8be124 ] After revoking atomic write, related LBA can be reused by others, so we need to wait page writeback before reusing the LBA, in order to avoid interference between old atomic written in-flight IO and new IO. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index 393039fdb26d..35d48ef0573c 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -207,6 +207,8 @@ static int __revoke_inmem_pages(struct inode *inode, lock_page(page); + f2fs_wait_on_page_writeback(page, DATA, true); + if (recover) { struct dnode_of_data dn; struct node_info ni;