Re: [PATCH v6 03/37] ntfs: handle source record removal failure during attribute moves
From: Namjae Jeon
Date: Sat Nov 21 2026 - 09:09:12 EST
On Wed, Nov 18, 2026 at 6:07 PM Xuewen Wang <wangxuewen_ky@xxxxxxx> wrote:
>
> From: Xuewen Wang <wangxuewen@xxxxxxxxxx>
>
> ntfs_attr_record_move_to() ignores failure to remove the source attribute
> after copying it. It can update the attribute-list reference and return
> success with both copies present.
>
> Check source removal before changing the list entry. On failure, attempt
> to remove the destination copy, dirty and unmap its record, and leave the
> list pointing to the source. Record both failures with the existing volume
> error bit and log messages after releasing the destination search context.
>
> Shrinking a record to zero needs no extra space, so failure indicates
> inconsistent record accounting. Return EFSCORRUPTED even if cleanup fails.
>
> Fixes: 495e90fa3348 ("ntfs: update attrib operations")
>
> Reviewed-by: Baolin Liu <liubaolin@xxxxxxxxxx>
> Signed-off-by: Xuewen Wang <wangxuewen@xxxxxxxxxx>
Applied it to #ntfs-next.
Thanks!