Re: [PATCH] ntfs: handle signal interruption in fallocate

From: Namjae Jeon

Date: Mon Aug 31 2026 - 06:47:19 EST


On Wed, Aug 26, 2026 at 3:00 PM Hongling Zeng <zenghongling@xxxxxxxxxx> wrote:
>
> The ntfs_attr_fallocate() function checks for pending signals during
> allocation loops and exits early via 'out' label. However, when a signal
> interrupts the operation with err == 0, the function returns 0 (success)
> instead of -EINTR.
>
> The signal_pending() checks at the allocation loops jump to 'out' without
> setting err = -EINTR, so the function returns success even when interrupted
> by a signal.
>
> Set err = -EINTR when jumping to the signal exit path, and only override
> when no other error is pending. This ensures:
>
> - Allocation interrupted by signal returns -EINTR
> - Allocation that completed successfully before signal arrived returns 0
> - Other errors are preserved and not overwritten by -EINTR
>
> Fixes: 495e90fa3348 ("ntfs: update attrib operations")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Hongling Zeng <zenghongling@xxxxxxxxxx>
Applid it to #ntfs-next.
Thanks!