aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext3/inode.c
diff options
context:
space:
mode:
authorWang Shilong <wangsl-fnst@cn.fujitsu.com>2013-01-12 04:36:17 -0500
committerJan Kara <jack@suse.cz>2013-01-21 05:19:57 -0500
commit1b7d76e9b1106f2be062f915b05d47658dd4fc63 (patch)
tree986543d21d3b870c54bd9e3280c7ec85fc4384db /fs/ext3/inode.c
parent2b0542a4a0d9b8cb98e64fc87c5e31d130029a92 (diff)
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>
Diffstat (limited to 'fs/ext3/inode.c')
-rw-r--r--fs/ext3/inode.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/ext3/inode.c b/fs/ext3/inode.c
index 6e4f8a529fbc..d7df06839f6a 100644
--- a/fs/ext3/inode.c
+++ b/fs/ext3/inode.c
@@ -1082,7 +1082,7 @@ struct buffer_head *ext3_getblk(handle_t *handle, struct inode *inode,
1082 if (!err && buffer_mapped(&dummy)) { 1082 if (!err && buffer_mapped(&dummy)) {
1083 struct buffer_head *bh; 1083 struct buffer_head *bh;
1084 bh = sb_getblk(inode->i_sb, dummy.b_blocknr); 1084 bh = sb_getblk(inode->i_sb, dummy.b_blocknr);
1085 if (!bh) { 1085 if (unlikely(!bh)) {
1086 *errp = -EIO; 1086 *errp = -EIO;
1087 goto err; 1087 goto err;
1088 } 1088 }
@@ -2733,7 +2733,7 @@ static int __ext3_get_inode_loc(struct inode *inode,
2733 return -EIO; 2733 return -EIO;
2734 2734
2735 bh = sb_getblk(inode->i_sb, block); 2735 bh = sb_getblk(inode->i_sb, block);
2736 if (!bh) { 2736 if (unlikely(!bh)) {
2737 ext3_error (inode->i_sb, "ext3_get_inode_loc", 2737 ext3_error (inode->i_sb, "ext3_get_inode_loc",
2738 "unable to read inode block - " 2738 "unable to read inode block - "
2739 "inode=%lu, block="E3FSBLK, 2739 "inode=%lu, block="E3FSBLK,
@@ -2787,7 +2787,7 @@ static int __ext3_get_inode_loc(struct inode *inode,
2787 2787
2788 bitmap_bh = sb_getblk(inode->i_sb, 2788 bitmap_bh = sb_getblk(inode->i_sb,
2789 le32_to_cpu(desc->bg_inode_bitmap)); 2789 le32_to_cpu(desc->bg_inode_bitmap));
2790 if (!bitmap_bh) 2790 if (unlikely(!bitmap_bh))
2791 goto make_io; 2791 goto make_io;
2792 2792
2793 /* 2793 /*