Re: [PATCH v1 3/9] ntfs: propagate reparse index insertion failure
Hyunchul Lee <[email protected]>
| Newsgroups | org.kernel.vger.linux-kernel,dev.linux.lists.ntfs |
|---|---|
| Message-ID | <CANFS6bbxOC33QPxzi7tEeXYgem60sRvNUSn4d60F=q34jbwhSg@mail.gmail.com> |
2026년 8월 21일 (금) 오후 2:33, Baolin Liu <[email protected]>님이 작성: > > From: Baolin Liu <[email protected]> > > update_reparse_data() ignores the return value of > set_reparse_index(). When index insertion fails, the code removes > the just-written reparse data as cleanup but still returns 0, so > symlink(2) (and WSL special file creation) reports success while > no reparse data exists on disk. When there was no previous reparse > data (oldsize == 0), the failure was likewise silently ignored. > > Propagate the error to the caller. > > Fixes: fc053f05ca28 ("ntfs: add reparse and ea operations") > Signed-off-by: Baolin Liu <[email protected]> Looks good to me. Reviewed-by: Hyunchul Lee <[email protected]> > --- > fs/ntfs/reparse.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/fs/ntfs/reparse.c b/fs/ntfs/reparse.c > index a8e413c61353..905ee08422d4 100644 > --- a/fs/ntfs/reparse.c > +++ b/fs/ntfs/reparse.c > @@ -618,8 +618,9 @@ static int update_reparse_data(struct ntfs_inode *ni, struct ntfs_index_context > goto put_rp_inode; > } > > - if (set_reparse_index(ni, xr, ((const struct reparse_point *)value)->reparse_tag) && > - oldsize > 0) { > + err = set_reparse_index(ni, xr, > + ((const struct reparse_point *)value)->reparse_tag); > + if (err && oldsize > 0) { > /* > * If cannot index, try to remove the reparse > * data and log the error. There will be an > -- > 2.51.0 > > -- Thanks, Hyunchul