Re: [PATCH v1 6/9] ntfs: return real error from ntfs_non_resident_attr_record_add()

Hyunchul Lee <[email protected]>
Newsgroups org.kernel.vger.linux-kernel,dev.linux.lists.ntfs
Message-ID <CANFS6bagc57dHH3K1rgx00+5ZymC5Fa+451M8p-Ns7Uxz9Tg9Q@mail.gmail.com>
2026년 8월 21일 (금) 오후 2:33, Baolin Liu <[email protected]>님이 작성:
>
> From: Baolin Liu <[email protected]>
>
> ntfs_non_resident_attr_record_add() returns -1 at its put_err_out
> label, which callers propagate as -EPERM to userspace.
>
> 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 3d0b305703d3..a2502eee717e 100644
> --- a/fs/ntfs/attrib.c
> +++ b/fs/ntfs/attrib.c
> @@ -2639,7 +2639,7 @@ static int ntfs_non_resident_attr_record_add(struct ntfs_inode *ni, __le32 type,
>         return offset;
>  put_err_out:
>         ntfs_attr_put_search_ctx(ctx);
> -       return -1;
> +       return err;
>  }
>
>  /*
> --
> 2.51.0
>
>


-- 
Thanks,
Hyunchul
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.