diff options
author | Chao Yu <yuchao0@huawei.com> | 2018-06-21 16:38:28 +0200 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2018-07-27 11:03:59 +0200 |
commit | 6aead1617b3adf2b7e2c56f0f13e4e0ee42ebb4a (patch) | |
tree | 546119225f29a26793e651d1efe9b67886122bd5 /fs/f2fs | |
parent | f2fs: assign REQ_RAHEAD to bio for ->readpages (diff) | |
download | linux-6aead1617b3adf2b7e2c56f0f13e4e0ee42ebb4a.tar.xz linux-6aead1617b3adf2b7e2c56f0f13e4e0ee42ebb4a.zip |
f2fs: fix to wait on page writeback before updating page
In error path of f2fs_move_rehashed_dirents, inode page could be writeback
state, so we should wait on inode page writeback before updating it.
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/inline.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/f2fs/inline.c b/fs/f2fs/inline.c index 043830be5662..9a245d2d5b7c 100644 --- a/fs/f2fs/inline.c +++ b/fs/f2fs/inline.c @@ -477,6 +477,7 @@ static int f2fs_move_rehashed_dirents(struct inode *dir, struct page *ipage, return 0; recover: lock_page(ipage); + f2fs_wait_on_page_writeback(ipage, NODE, true); memcpy(inline_dentry, backup_dentry, MAX_INLINE_DATA(dir)); f2fs_i_depth_write(dir, 0); f2fs_i_size_write(dir, MAX_INLINE_DATA(dir)); |