Re: [PATCH v6 02/37] ntfs: preserve cluster-free counts in attribute cleanup

From: Namjae Jeon

Date: Sun Nov 22 2026 - 05:48:22 EST


On Wed, Nov 18, 2026 at 6:07 PM Xuewen Wang <wangxuewen_ky@xxxxxxx> wrote:
>
> From: Baolin Liu <liubaolin@xxxxxxxxxx>
>
> ntfs_cluster_free() returns a signed 64-bit cluster count on success,
> not an integer status. Several attribute cleanup paths truncate that
> count or treat a positive count as an error. ntfs_attr_rm() can even
> return the count to callers that expect zero on success.
>
> Store the result in s64 variables, test negative results for failure,
> and compare the full count when validating an allocation rollback.
> Return zero from ntfs_attr_rm() after successful removal. This keeps
> successful deallocation from being misclassified by later reporting.
>
> Fixes: 495e90fa3348 ("ntfs: update attrib operations")
> Signed-off-by: Baolin Liu <liubaolin@xxxxxxxxxx>
Applied it to #ntfs-next.
Thanks.