Re: [PATCH v6 04/37] ntfs: preserve attribute search context initialization errors
From: Namjae Jeon
Date: Sun Nov 22 2026 - 05:51:59 EST
On Wed, Nov 18, 2026 at 6:07 PM Xuewen Wang <wangxuewen_ky@xxxxxxx> wrote:
>
> From: Xuewen Wang <wangxuewen@xxxxxxxxxx>
>
> ntfs_attr_get_search_ctx() returns NULL for both allocation and MFT
> mapping failures, causing callers to misreport mapping errors as ENOMEM.
>
> Return error pointers carrying the original errno and convert all callers
> and the documented usage. Clear error pointers before shared cleanup.
> Make ntfs_attr_exist() return 1 for present, 0 only for a lookup miss and
> a negative errno on failure. Update the index and reparse callers so a
> failed lookup cannot be mistaken for an absent attribute.
>
> Reviewed-by: Baolin Liu <liubaolin@xxxxxxxxxx>
> Signed-off-by: Xuewen Wang <wangxuewen@xxxxxxxxxx>
Applied it to #ntfs-next.
Thanks.