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/node.c | |
parent | fe76b796fc5194cc3d57265002e3a748566d073f (diff) | |
download | linux-237c0790e54020d522b8fd23097e8dcafb4e331d.tar.bz2 |
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/node.c')
-rw-r--r-- | fs/f2fs/node.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index db73f3c823dc..ca1bb3cc6c32 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@ -1045,7 +1045,8 @@ struct page *new_node_page(struct dnode_of_data *dn, f2fs_wait_on_page_writeback(page, NODE, true); fill_node_footer(page, dn->nid, dn->inode->i_ino, ofs, true); set_cold_node(dn->inode, page); - SetPageUptodate(page); + if (!PageUptodate(page)) + SetPageUptodate(page); if (set_page_dirty(page)) dn->node_changed = true; @@ -1644,7 +1645,8 @@ static int f2fs_set_node_page_dirty(struct page *page) { trace_f2fs_set_page_dirty(page, NODE); - 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_NODES); @@ -2015,7 +2017,8 @@ int recover_inode_page(struct f2fs_sb_info *sbi, struct page *page) /* Should not use this inode from free nid list */ remove_free_nid(NM_I(sbi), ino); - SetPageUptodate(ipage); + if (!PageUptodate(ipage)) + SetPageUptodate(ipage); fill_node_footer(ipage, ino, ino, 0, true); src = F2FS_INODE(page); |