Skip to contentSkip to conversation

f2fs: use unlikely for release case

PATCH In review LiFan 2 participants 2 messages Dec 5, 2017 – Dec 11, 2017 1 message not in the archive F2FS file system

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): CGME20171205083900epcas5p3da0ba06455bf7f17ffacd0b25328aca3@epcas5p3.samsung.com

LiFan

author
#1 lore raw

PATCH 1/1 f2fs: use unlikely for release case

Since the variable release is only nonzero when another unlikely case occurs, use unlikely() on it seems logical.

---
 fs/f2fs/f2fs.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/f2fs/f2fs.h +1 -1
index 71fbba96..0f01af0 100644
@@ -1594,7 +1594,7 @@ static inline int inc_valid_block_count(struct f2fs_sb_info *sbi,
 	}
 	spin_unlock(&sbi->stat_lock);
 
-	if (release)
+	if (unlikely(release))
 		dquot_release_reservation_block(inode, release);
 	f2fs_i_blocks_write(inode, *count, true, true);
 	return 0;
Signature · 1 line
2.7.4