mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-14 08:13:56 +08:00
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,
|
||||
* it had better in-place writes for updated data.
|
||||
*/
|
||||
if (old_blk_addr != NEW_ADDR && !is_cold_data(page) &&
|
||||
need_inplace_update(inode)) {
|
||||
if (unlikely(old_blk_addr != NEW_ADDR &&
|
||||
!is_cold_data(page) &&
|
||||
need_inplace_update(inode))) {
|
||||
rewrite_data_page(F2FS_SB(inode->i_sb), page,
|
||||
old_blk_addr);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user