diff options
author | Wang Shilong <wangsl-fnst@cn.fujitsu.com> | 2013-01-12 04:34:50 -0500 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2013-01-21 05:19:56 -0500 |
commit | 2b0542a4a0d9b8cb98e64fc87c5e31d130029a92 (patch) | |
tree | f4dceeb8df21b16ffe4fe949816503b15d0fc649 /fs/ext2/xattr.c | |
parent | 61f43e6880dee5983999fe40bf96c1cf43740b4c (diff) |
Ext2: 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: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/ext2/xattr.c')
-rw-r--r-- | fs/ext2/xattr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext2/xattr.c b/fs/ext2/xattr.c index b6754dbbce3c..06209ec46152 100644 --- a/fs/ext2/xattr.c +++ b/fs/ext2/xattr.c | |||
@@ -662,7 +662,7 @@ ext2_xattr_set2(struct inode *inode, struct buffer_head *old_bh, | |||
662 | ea_idebug(inode, "creating block %d", block); | 662 | ea_idebug(inode, "creating block %d", block); |
663 | 663 | ||
664 | new_bh = sb_getblk(sb, block); | 664 | new_bh = sb_getblk(sb, block); |
665 | if (!new_bh) { | 665 | if (unlikely(!new_bh)) { |
666 | ext2_free_blocks(inode, block, 1); | 666 | ext2_free_blocks(inode, block, 1); |
667 | mark_inode_dirty(inode); | 667 | mark_inode_dirty(inode); |
668 | error = -EIO; | 668 | error = -EIO; |