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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user