diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c index 627c98abbed9e04cb32613a5b950b8ccc19cc7d3..efc16a4b7cebdb7a4ebfa5c39f881816051ffa88 100644 --- a/fs/ext4/xattr.c +++ b/fs/ext4/xattr.c @@ -1300,6 +1300,8 @@ int ext4_expand_extra_isize_ea(struct inode *inode, int new_extra_isize, /* Remove the chosen entry from the inode */ error = ext4_xattr_ibody_set(handle, inode, &i, is); + if (error) + goto cleanup; entry = IFIRST(header); if (entry_size + EXT4_XATTR_SIZE(size) >= new_extra_isize)