ntfs: propagate EA truncate errors

Propagate errors from truncating an EA stream so callers do not
report a successful xattr update after a failed resize.

Fixes: fc053f05ca ("ntfs: add reparse and ea operations")
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
This commit is contained in:
Namjae Jeon 2026-10-07 17:12:54 +09:00
parent 58442927b7
commit 2711088854

View File

@ -37,7 +37,7 @@ static int ntfs_write_ea(struct ntfs_inode *ni, __le32 type, char *value, s64 ea
struct ntfs_inode *ea_ni = NTFS_I(ea_vi);
if (need_truncate && ea_ni->data_size > ea_off + ea_size)
ntfs_attr_truncate(ea_ni, ea_off + ea_size);
err = ntfs_attr_truncate(ea_ni, ea_off + ea_size);
mark_mft_record_dirty(ni);
}