mirror of
https://github.com/torvalds/linux.git
synced 2026-11-10 17:11:02 +01:00
ntfs: propagate EA write and truncate errors
ntfs_write_ea() replaces negative write errors with EIO and ignores errors when shrinking the attribute after writing a shorter list. This can report success even though the final resize failed. Preserve negative write errors, use EIO for short writes, and return truncate failures to the caller. Signed-off-by: Baolin Liu <liubaolin@kylinos.cn> Reviewed-by: Hyunchul Lee <hyc.lee@gmail.com> Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
This commit is contained in:
parent
7973cd834d
commit
2c0f29069e
|
|
@ -32,7 +32,7 @@ static int ntfs_write_ea(struct ntfs_inode *ni, __le32 type, char *value, s64 ea
|
|||
|
||||
written = ntfs_inode_attr_pwrite(ea_vi, ea_off, ea_size, value, false);
|
||||
if (written != ea_size)
|
||||
err = -EIO;
|
||||
err = written < 0 ? written : -EIO;
|
||||
else {
|
||||
struct ntfs_inode *ea_ni = NTFS_I(ea_vi);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user