summaryrefslogtreecommitdiff
path: root/fs/f2fs/file.c
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2016-06-30 18:49:15 -0700
committerJaegeuk Kim <jaegeuk@kernel.org>2016-07-08 10:33:29 -0700
commit237c0790e54020d522b8fd23097e8dcafb4e331d (patch)
tree57af2ddd9bff9382d6330ca894497d3fb37bfb2e /fs/f2fs/file.c
parentfe76b796fc5194cc3d57265002e3a748566d073f (diff)
downloadlwn-237c0790e54020d522b8fd23097e8dcafb4e331d.tar.gz
lwn-237c0790e54020d522b8fd23097e8dcafb4e331d.zip
f2fs: call SetPageUptodate if needed
SetPageUptodate() issues memory barrier, resulting in performance degrdation. Let's avoid that. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/file.c')
-rw-r--r--fs/f2fs/file.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index d07e7759f970..2b777a42bf43 100644
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@ -81,7 +81,8 @@ static int f2fs_vm_page_mkwrite(struct vm_area_struct *vma,
zero_user_segment(page, offset, PAGE_SIZE);
}
set_page_dirty(page);
- SetPageUptodate(page);
+ if (!PageUptodate(page))
+ SetPageUptodate(page);
trace_f2fs_vm_page_mkwrite(page, DATA);
mapped: