diff options
author | Chao Yu <yuchao0@huawei.com> | 2018-04-23 10:36:13 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-08-03 07:55:15 +0200 |
commit | 570f12a8b651e45a0af48cced6c54c571e5bb328 (patch) | |
tree | cf470af30a0323425d1d5e2901f1fb24bc644e67 | |
parent | b7ea2b8616d950bbbebb1d28239d7ab9eee4fe1b (diff) |
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 <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | fs/f2fs/segment.c | 2 |
1 files changed, 2 insertions, 0 deletions
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; |