f2fs: optimize do_write_data_page()
Since "need_inplace_update() == true" is a very rare case, using unlikely() to give compiler a chance to optimize the code. Signed-off-by: Haicheng Li <haicheng.li@linux.intel.com> Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
This commit is contained in:
parent
8d8451af68
commit
b25958b6ec
|
@ -497,8 +497,9 @@ int do_write_data_page(struct page *page)
|
||||||
* If current allocation needs SSR,
|
* If current allocation needs SSR,
|
||||||
* it had better in-place writes for updated data.
|
* it had better in-place writes for updated data.
|
||||||
*/
|
*/
|
||||||
if (old_blk_addr != NEW_ADDR && !is_cold_data(page) &&
|
if (unlikely(old_blk_addr != NEW_ADDR &&
|
||||||
need_inplace_update(inode)) {
|
!is_cold_data(page) &&
|
||||||
|
need_inplace_update(inode))) {
|
||||||
rewrite_data_page(F2FS_SB(inode->i_sb), page,
|
rewrite_data_page(F2FS_SB(inode->i_sb), page,
|
||||||
old_blk_addr);
|
old_blk_addr);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue