You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
ext4: use unlikely to improve the efficiency of the kernel
Because the function 'sb_getblk' seldomly fails to return NULL value,it will be better to use 'unlikely' to optimize it. Signed-off-by: Wang Shilong <wangsl-fnst@cn.fujitsu.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
This commit is contained in:
committed by
Theodore Ts'o
parent
860d21e2c5
commit
aebf02430d
+1
-1
@@ -886,7 +886,7 @@ inserted:
|
||||
(unsigned long long)block);
|
||||
|
||||
new_bh = sb_getblk(sb, block);
|
||||
if (!new_bh) {
|
||||
if (unlikely(!new_bh)) {
|
||||
error = -ENOMEM;
|
||||
getblk_failed:
|
||||
ext4_free_blocks(handle, inode, NULL, block, 1,
|
||||
|
||||
Reference in New Issue
Block a user