summaryrefslogtreecommitdiff
path: root/fs/f2fs/xattr.c
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk.kim@samsung.com>2013-12-06 10:00:58 +0400
committerJaegeuk Kim <jaegeuk.kim@samsung.com>2013-12-23 05:18:06 +0400
commit6bacf52fb58aeb3e89d9a62970b85a5570aa8ace (patch)
tree422eb46c144b7ffbae193570a001de2eed490e09 /fs/f2fs/xattr.c
parentcfb271d485d0ec31eb92b51f4fbe54bf6542e8e6 (diff)
downloadlinux-6bacf52fb58aeb3e89d9a62970b85a5570aa8ace.tar.xz
f2fs: add unlikely() macro for compiler more aggressively
This patch adds unlikely() macro into the most of codes. The basic rule is to add that when: - checking unusual errors, - checking page mappings, - and the other unlikely conditions. Change log from v1: - Don't add unlikely for the NULL test and error test: advised by Andi Kleen. Cc: Chao Yu <chao2.yu@samsung.com> Cc: Andi Kleen <andi@firstfloor.org> Reviewed-by: Chao Yu <chao2.yu@samsung.com> Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/f2fs/xattr.c')
-rw-r--r--fs/f2fs/xattr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/xattr.c b/fs/f2fs/xattr.c
index aa7a3f139fe5..b0fb8a27f3da 100644
--- a/fs/f2fs/xattr.c
+++ b/fs/f2fs/xattr.c
@@ -522,7 +522,7 @@ static int __f2fs_setxattr(struct inode *inode, int name_index,
if (found)
free = free + ENTRY_SIZE(here);
- if (free < newsize) {
+ if (unlikely(free < newsize)) {
error = -ENOSPC;
goto exit;
}