History

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.

Theodore Ts'o committed 3 years ago

Commit 2a534e11 parent 2220eaf1 file · +1 −1Browse files

Unified · Split

fs/ext4/inline.c+1−1
@@ -360,7 +360,7 @@ static int ext4_update_inline_data(handle_t *handle, struct inode *inode, · 359 unmodified lines
360 360
361 error = ext4_xattr_ibody_get(inode, i.name_index, i.name,361 error = ext4_xattr_ibody_get(inode, i.name_index, i.name,
362 value, len);362 value, len);
363 if (error == -ENODATA)363 if (error < 0)
364 goto out;364 goto out;
365 365
366 BUFFER_TRACE(is.iloc.bh, "get_write_access");366 BUFFER_TRACE(is.iloc.bh, "get_write_access");