diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2016-07-01 04:49:15 +0300 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2016-07-08 20:33:29 +0300 |
commit | 237c0790e54020d522b8fd23097e8dcafb4e331d (patch) | |
tree | 57af2ddd9bff9382d6330ca894497d3fb37bfb2e /fs/f2fs/inline.c | |
parent | fe76b796fc5194cc3d57265002e3a748566d073f (diff) | |
download | linux-237c0790e54020d522b8fd23097e8dcafb4e331d.tar.xz |
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/inline.c')
-rw-r--r-- | fs/f2fs/inline.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/fs/f2fs/inline.c b/fs/f2fs/inline.c index e10e958250ff..2cd0edcc4ebc 100644 --- a/fs/f2fs/inline.c +++ b/fs/f2fs/inline.c @@ -59,7 +59,8 @@ void read_inline_data(struct page *page, struct page *ipage) memcpy(dst_addr, src_addr, MAX_INLINE_DATA); flush_dcache_page(page); kunmap_atomic(dst_addr); - SetPageUptodate(page); + if (!PageUptodate(page)) + SetPageUptodate(page); } bool truncate_inline_inode(struct page *ipage, u64 from) @@ -97,7 +98,8 @@ int f2fs_read_inline_data(struct inode *inode, struct page *page) else read_inline_data(page, ipage); - SetPageUptodate(page); + if (!PageUptodate(page)) + SetPageUptodate(page); f2fs_put_page(ipage, 1); unlock_page(page); return 0; @@ -370,7 +372,8 @@ static int f2fs_move_inline_dirents(struct inode *dir, struct page *ipage, NR_INLINE_DENTRY * F2FS_SLOT_LEN); kunmap_atomic(dentry_blk); - SetPageUptodate(page); + if (!PageUptodate(page)) + SetPageUptodate(page); set_page_dirty(page); /* clear inline dir and flag after data writeback */ |