Skip to content

Commit 5f80f62

Browse files
Wei Yuantytso
Wei Yuan
authored andcommitted
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 <weiyuan.wei@huawei.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu> Reviewed-by: Lukas Czerner <lczerner@redhat.com>
1 parent 72b8e0f commit 5f80f62

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

fs/ext4/xattr.c

+1-2
Original file line numberDiff line numberDiff line change
@@ -638,8 +638,7 @@ ext4_xattr_set_entry(struct ext4_xattr_info *i, struct ext4_xattr_search *s)
638638
free += EXT4_XATTR_LEN(name_len);
639639
}
640640
if (i->value) {
641-
if (free < EXT4_XATTR_SIZE(i->value_len) ||
642-
free < EXT4_XATTR_LEN(name_len) +
641+
if (free < EXT4_XATTR_LEN(name_len) +
643642
EXT4_XATTR_SIZE(i->value_len))
644643
return -ENOSPC;
645644
}

0 commit comments

Comments
 (0)