diff options
author | Wang Shilong <wangsl-fnst@cn.fujitsu.com> | 2013-01-12 22:28:47 +0100 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2013-01-12 22:28:47 +0100 |
commit | aebf02430d25b6bd2b8542126fdcdb90e75a24b8 (patch) | |
tree | 7f884e64b000d9bed3a59dd557b3075a2da4405d /fs/ext4/xattr.c | |
parent | ext4: return ENOMEM if sb_getblk() fails (diff) | |
download | linux-aebf02430d25b6bd2b8542126fdcdb90e75a24b8.tar.xz linux-aebf02430d25b6bd2b8542126fdcdb90e75a24b8.zip |
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>
Diffstat (limited to '')
-rw-r--r-- | fs/ext4/xattr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c index 07d684a4e523..c68990c392c7 100644 --- a/fs/ext4/xattr.c +++ b/fs/ext4/xattr.c @@ -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, |