Ext3: 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 check it.

Signed-off-by: Wang Shilong <wangsl-fnst@cn.fujitsu.com>
Signed-off-by: Jan Kara <jack@suse.cz>
This commit is contained in:
Wang Shilong
2013-01-12 01:36:17 -08:00
committed by Jan Kara
parent 2b0542a4a0
commit 1b7d76e9b1
3 changed files with 7 additions and 7 deletions

View File

@@ -813,7 +813,7 @@ inserted:
ea_idebug(inode, "creating block %d", block);
new_bh = sb_getblk(sb, block);
if (!new_bh) {
if (unlikely(!new_bh)) {
getblk_failed:
ext3_free_blocks(handle, inode, block, 1);
error = -EIO;