]> git.itanic.dy.fi Git - linux-stable/commitdiff
ext4: bail out of ext4_xattr_ibody_get() fails for any reason
authorTheodore Ts'o <tytso@mit.edu>
Fri, 12 May 2023 19:16:27 +0000 (15:16 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 13 May 2023 22:05:05 +0000 (18:05 -0400)
In ext4_update_inline_data(), if ext4_xattr_ibody_get() fails for any
reason, it's best if we just fail as opposed to stumbling on,
especially if the failure is EFSCORRUPTED.

Cc: stable@kernel.org
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/inline.c

index f47adb284e9014bbefb6825966ef5d372ffb5c51..5854bd5a33526807dc6194e7043ad16fe4d389f9 100644 (file)
@@ -360,7 +360,7 @@ static int ext4_update_inline_data(handle_t *handle, struct inode *inode,
 
        error = ext4_xattr_ibody_get(inode, i.name_index, i.name,
                                     value, len);
-       if (error == -ENODATA)
+       if (error < 0)
                goto out;
 
        BUFFER_TRACE(is.iloc.bh, "get_write_access");