diff options
| author | Theodore Ts'o <tytso@mit.edu> | 2023-05-12 15:16:27 -0400 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-05-17 11:48:17 +0200 |
| commit | d88fe8e6112696238deeaf09820db183663eabca (patch) | |
| tree | 35270112ca8e1b05f1db7ce14ed98e324930c9f6 | |
| parent | 4597554b4f7b29e7fd78aa449bab648f8da4ee2c (diff) | |
| download | linux-d88fe8e6112696238deeaf09820db183663eabca.tar.gz linux-d88fe8e6112696238deeaf09820db183663eabca.tar.bz2 linux-d88fe8e6112696238deeaf09820db183663eabca.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>
| -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 d0bd1046f4a0..979935c078fb 100644 --- a/fs/ext4/inline.c +++ b/fs/ext4/inline.c @@ -358,7 +358,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"); |
