summaryrefslogtreecommitdiff
path: root/fs/f2fs
diff options
context:
space:
mode:
authorFan Li <fanofcode.li@samsung.com>2015-08-04 08:27:51 +0300
committerJaegeuk Kim <jaegeuk@kernel.org>2015-08-05 18:08:16 +0300
commit5768dcdd7f7675f9540e648428c8a1cd7208a0fe (patch)
tree3f5f2fb2709d0e80fbae9cfc6c3e0328c1af66a1 /fs/f2fs
parentedb27deea7cabfff8feb8c62aae647b7673be734 (diff)
downloadlinux-5768dcdd7f7675f9540e648428c8a1cd7208a0fe.tar.xz
f2fs: change the timing of f2fs_wait_on_page_writeback
some backing devices need pages to be stable during writeback. It doesn't matter if the page is completely overwritten or already uptodate, it needs to wait before write. Signed-off-by: Fan li <fanofcode.li@samsung.com> Reviewed-by: Chao Yu <chao2.yu@samsung.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs')
-rw-r--r--fs/f2fs/data.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index e4081fc91012..2692848e7f75 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -1383,13 +1383,13 @@ put_next:
f2fs_put_dnode(&dn);
f2fs_unlock_op(sbi);
+ f2fs_wait_on_page_writeback(page, DATA);
+
if (len == PAGE_CACHE_SIZE)
goto out_update;
if (PageUptodate(page))
goto out_clear;
- f2fs_wait_on_page_writeback(page, DATA);
-
if ((pos & PAGE_CACHE_MASK) >= i_size_read(inode)) {
unsigned start = pos & (PAGE_CACHE_SIZE - 1);
unsigned end = start + len;