summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2023-05-12 21:16:27 +0200
committerTheodore Ts'o <tytso@mit.edu>2023-05-14 00:05:05 +0200
commit2a534e1d0d1591e951f9ece2fb460b2ff92edabd (patch)
treee421dc41d807f90cf4f7781ab0bb8382f621b20a
parentext4: add bounds checking in get_max_inline_xattr_value_size() (diff)
downloadlinux-2a534e1d0d1591e951f9ece2fb460b2ff92edabd.tar.xz
linux-2a534e1d0d1591e951f9ece2fb460b2ff92edabd.zip
ext4: bail out of ext4_xattr_ibody_get() fails for any reason
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>
-rw-r--r--fs/ext4/inline.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext4/inline.c b/fs/ext4/inline.c
index f47adb284e90..5854bd5a3352 100644
--- a/fs/ext4/inline.c
+++ b/fs/ext4/inline.c
@@ -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");