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:
Wang Shilong
2013-01-12 16:28:47 -05:00
committed by Theodore Ts'o
parent 860d21e2c5
commit aebf02430d
5 changed files with 13 additions and 13 deletions
+1 -1
View File
@@ -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,