Re: [PATCH v1 5/9] ntfs: preserve error code in ntfs_resident_attr_record_add()
Hyunchul Lee <[email protected]>
| Newsgroups | org.kernel.vger.linux-kernel,dev.linux.lists.ntfs |
|---|---|
| Message-ID | <CANFS6baR3mGP26ca63AnPX0om_u3-sGoN4ka6vR-74Gf6cOhKA@mail.gmail.com> |
2026년 8월 21일 (금) 오후 2:33, Baolin Liu <[email protected]>님이 작성: > > From: Baolin Liu <[email protected]> > > ntfs_resident_attr_record_add() collapses every failure to -EIO at > its put_err_out label. This defeats the resident-to-non-resident > fallback in ntfs_attr_add(), which relies on seeing -ENOSPC to > convert the attribute when the MFT record has no room, and also > hides -EEXIST and -ENOMEM from callers. > > Return the actual error code. Every path reaching the label has > err set to a negative errno. > > Fixes: 495e90fa3348 ("ntfs: update attrib operations") > Signed-off-by: Baolin Liu <[email protected]> Looks good to me. Reviewed-by: Hyunchul Lee <[email protected]> > --- > fs/ntfs/attrib.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/ntfs/attrib.c b/fs/ntfs/attrib.c > index 990c3937a551..3d0b305703d3 100644 > --- a/fs/ntfs/attrib.c > +++ b/fs/ntfs/attrib.c > @@ -2500,7 +2500,7 @@ int ntfs_resident_attr_record_add(struct ntfs_inode *ni, __le32 type, > return offset; > put_err_out: > ntfs_attr_put_search_ctx(ctx); > - return -EIO; > + return err; > } > > /* > -- > 2.51.0 > > -- Thanks, Hyunchul