If a file has EXT4_INODE_INLINE_DATA set but lacks the EXT4_STATE_XATTR flag, ext4_xattr_ibody_find() will exit early without modifying is.s.not_found. This may cause ext4_xattr_ibody_set() to behave incorrectly. Signed-off-by: shuo chen <1289151713@qq.com> --- fs/ext4/inline.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ext4/inline.c b/fs/ext4/inline.c index ceee69a66482..3398208f3e66 100644 --- a/fs/ext4/inline.c +++ b/fs/ext4/inline.c @@ -437,7 +437,7 @@ static int ext4_destroy_inline_data_nolock(handle_t *handle, { struct ext4_inode_info *ei = EXT4_I(inode); struct ext4_xattr_ibody_find is = { - .s = { .not_found = 0, }, + .s = { .not_found = -ENODATA, }, }; struct ext4_xattr_info i = { .name_index = EXT4_XATTR_INDEX_SYSTEM, -- 2.55.0