From: Wei Yuan Date: Fri, 3 Apr 2015 03:50:48 +0000 (-0400) Subject: ext4: remove useless condition in if statement. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5f80f62adae2a2920781a847805d34b36b323f7d;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git ext4: remove useless condition in if statement. In this if statement, the previous condition is useless, the later one has covered it. Signed-off-by: Weiyuan Signed-off-by: Theodore Ts'o Reviewed-by: Lukas Czerner --- diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c index 99a2cf858c8f..759842ff8af0 100644 --- a/fs/ext4/xattr.c +++ b/fs/ext4/xattr.c @@ -638,8 +638,7 @@ ext4_xattr_set_entry(struct ext4_xattr_info *i, struct ext4_xattr_search *s) free += EXT4_XATTR_LEN(name_len); } if (i->value) { - if (free < EXT4_XATTR_SIZE(i->value_len) || - free < EXT4_XATTR_LEN(name_len) + + if (free < EXT4_XATTR_LEN(name_len) + EXT4_XATTR_SIZE(i->value_len)) return -ENOSPC; }