Fix make-fsync-to-sync-parent-dir-in-no-journal-for-real-this-time
[ext4-patch-queue.git] / remove-useless-condition-in-if-statement
bloba0bc00e2e3e64915f668b2f27ba51f604cd4be33
1 ext4: remove useless condition in if statement.
3 From: Wei Yuan <weiyuan.wei@huawei.com>
5 In this if statement, the previous condition is useless, the later one
6 has covered it.
8 Signed-off-by: Weiyuan <weiyuan.wei@huawei.com>
9 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
10 Reviewed-by: Lukas Czerner <lczerner@redhat.com>
11 ---
12  fs/ext4/xattr.c | 3 +--
13  1 file changed, 1 insertion(+), 2 deletions(-)
15 diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c
16 index 1e09fc7..f2ccad7 100644
17 --- a/fs/ext4/xattr.c
18 +++ b/fs/ext4/xattr.c
19 @@ -639,8 +639,7 @@ ext4_xattr_set_entry(struct ext4_xattr_info *i, struct ext4_xattr_search *s)
20                 free += EXT4_XATTR_LEN(name_len);
21         }
22         if (i->value) {
23 -               if (free < EXT4_XATTR_SIZE(i->value_len) ||
24 -                   free < EXT4_XATTR_LEN(name_len) +
25 +               if (free < EXT4_XATTR_LEN(name_len) +
26                            EXT4_XATTR_SIZE(i->value_len))
27                         return -ENOSPC;
28         }
30 2.1.0
33 To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
34 the body of a message to majordomo@vger.kernel.org
35 More majordomo info at  http://vger.kernel.org/majordomo-info.html