diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c index 499cb4b1fbd22b98a8b8d923910ed0cce72d6994..fc4ced59c565b7b8ad2d36af9b8e1894c7fd3029 100644 --- a/fs/ext4/xattr.c +++ b/fs/ext4/xattr.c @@ -1688,7 +1688,7 @@ static int ext4_xattr_set_entry(struct ext4_xattr_info *i, /* No failures allowed past this point. */ - if (!s->not_found && here->e_value_offs) { + if (!s->not_found && here->e_value_size && here->e_value_offs) { /* Remove the old value. */ void *first_val = s->base + min_offs; size_t offs = le16_to_cpu(here->e_value_offs);