summaryrefslogtreecommitdiffstats
path: root/fs/ext4/mmp.c
diff options
context:
space:
mode:
authorWang Shilong <wangsl-fnst@cn.fujitsu.com>2013-01-12 16:28:47 -0500
committerTheodore Ts'o <tytso@mit.edu>2013-01-12 16:28:47 -0500
commitaebf02430d25b6bd2b8542126fdcdb90e75a24b8 (patch)
tree7f884e64b000d9bed3a59dd557b3075a2da4405d /fs/ext4/mmp.c
parent860d21e2c585f7ee8a4ecc06f474fdc33c9474f4 (diff)
downloadlinux-stable-aebf02430d25b6bd2b8542126fdcdb90e75a24b8.tar.gz
linux-stable-aebf02430d25b6bd2b8542126fdcdb90e75a24b8.tar.bz2
linux-stable-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 'fs/ext4/mmp.c')
-rw-r--r--fs/ext4/mmp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext4/mmp.c b/fs/ext4/mmp.c
index 44734f1ca554..f9b551561d2c 100644
--- a/fs/ext4/mmp.c
+++ b/fs/ext4/mmp.c
@@ -93,7 +93,7 @@ static int read_mmp_block(struct super_block *sb, struct buffer_head **bh,
*bh = NULL;
}
}
- if (!*bh) {
+ if (unlikely(!*bh)) {
ext4_warning(sb, "Error while reading MMP block %llu",
mmp_block);
return -EIO;