diff options
author | Wang Shilong <wangsl-fnst@cn.fujitsu.com> | 2013-01-12 10:34:50 +0100 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2013-01-21 11:19:56 +0100 |
commit | 2b0542a4a0d9b8cb98e64fc87c5e31d130029a92 (patch) | |
tree | f4dceeb8df21b16ffe4fe949816503b15d0fc649 /fs/ext2/super.c | |
parent | Ext3: add necessary check in case IO error happens (diff) | |
download | linux-2b0542a4a0d9b8cb98e64fc87c5e31d130029a92.tar.xz linux-2b0542a4a0d9b8cb98e64fc87c5e31d130029a92.zip |
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/super.c')
-rw-r--r-- | fs/ext2/super.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext2/super.c b/fs/ext2/super.c index fa04d023177e..7f68c8114026 100644 --- a/fs/ext2/super.c +++ b/fs/ext2/super.c @@ -1500,7 +1500,7 @@ static ssize_t ext2_quota_write(struct super_block *sb, int type, bh = sb_bread(sb, tmp_bh.b_blocknr); else bh = sb_getblk(sb, tmp_bh.b_blocknr); - if (!bh) { + if (unlikely(!bh)) { err = -EIO; goto out; } |