diff options
author | Chao Yu <yuchao0@huawei.com> | 2018-04-23 04:36:13 +0200 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2018-05-31 20:31:51 +0200 |
commit | e5e5732d8120654159254c16834bc8663d8be124 (patch) | |
tree | 4ab55b76d9faac29ca3cbcd907206582fe06e5eb /fs/f2fs | |
parent | f2fs: Fix deadlock in shutdown ioctl (diff) | |
download | linux-e5e5732d8120654159254c16834bc8663d8be124.tar.xz linux-e5e5732d8120654159254c16834bc8663d8be124.zip |
f2fs: fix to wait page writeback during revoking atomic write
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>
Diffstat (limited to 'fs/f2fs')
-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 bf9dafd21499..8fabf3a34bd7 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -230,6 +230,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; |