summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2023-05-12 15:16:27 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-05-17 14:02:07 +0200
commit7564c1498e995f80e43ecc9cd0bdb76a70303813 (patch)
treecdb004c6355044ee022558795a63bc63bb98b7a2 /fs
parent88a06a94942c5c0a896e9da1113a6bb29e36cbef (diff)
downloadlinux-stable-7564c1498e995f80e43ecc9cd0bdb76a70303813.tar.gz
linux-stable-7564c1498e995f80e43ecc9cd0bdb76a70303813.tar.bz2
linux-stable-7564c1498e995f80e43ecc9cd0bdb76a70303813.zip
ext4: bail out of ext4_xattr_ibody_get() fails for any reason
commit 2a534e1d0d1591e951f9ece2fb460b2ff92edabd upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs')
-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 db1ca23d3fe0..cb36037f20fc 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");