diff options
author | Theodore Ts'o <tytso@mit.edu> | 2023-05-12 22:16:27 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-05-17 12:11:50 +0300 |
commit | 0fc1041a98be9b1f2eb040554e4d379951a29ad9 (patch) | |
tree | 52227553b5ceedc86555b88ec24ead150963870b /fs | |
parent | 5a229d21b98d132673096710e8281ef522dab1d1 (diff) | |
download | linux-0fc1041a98be9b1f2eb040554e4d379951a29ad9.tar.xz |
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.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext4/inline.c b/fs/ext4/inline.c index 25f23840ddbd..92d7778cd6c4 100644 --- a/fs/ext4/inline.c +++ b/fs/ext4/inline.c @@ -364,7 +364,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"); |