diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2016-06-30 18:49:15 -0700 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2016-07-08 10:33:29 -0700 |
commit | 237c0790e54020d522b8fd23097e8dcafb4e331d (patch) | |
tree | 57af2ddd9bff9382d6330ca894497d3fb37bfb2e /fs/f2fs/checkpoint.c | |
parent | fe76b796fc5194cc3d57265002e3a748566d073f (diff) | |
download | linux-237c0790e54020d522b8fd23097e8dcafb4e331d.tar.gz linux-237c0790e54020d522b8fd23097e8dcafb4e331d.tar.bz2 linux-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/checkpoint.c')
-rw-r--r-- | fs/f2fs/checkpoint.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c index 2755ef730a41..8ea895389ae4 100644 --- a/fs/f2fs/checkpoint.c +++ b/fs/f2fs/checkpoint.c @@ -48,7 +48,8 @@ repeat: goto repeat; } f2fs_wait_on_page_writeback(page, META, true); - SetPageUptodate(page); + if (!PageUptodate(page)) + SetPageUptodate(page); return page; } @@ -364,7 +365,8 @@ static int f2fs_set_meta_page_dirty(struct page *page) { trace_f2fs_set_page_dirty(page, META); - SetPageUptodate(page); + if (!PageUptodate(page)) + SetPageUptodate(page); if (!PageDirty(page)) { f2fs_set_page_dirty_nobuffers(page); inc_page_count(F2FS_P_SB(page), F2FS_DIRTY_META); |