Re: [PATCH 4/5] block: add a bio_submit_or_kill helper

Christoph Hellwig
2026-04-14T08:24:12Z

On Tue, Apr 07, 2026 at 11:37:50AM -0700, Bart Van Assche wrote:
> Without this change, if a fatal signal is pending before the loop starts,
> -EINTR is returned. With this patch applied, 0 is returned,
> isn't it?

I looked at this a bit, and it turns that while this indeed changes the
behavior for discard, the other ioctls had the return 0 when nothing
was submitted before the thread got killed behavior, and this makes
discard match them.
Given that we won't return from the system call for a fatal kill it
should not matter. Adding Keith who wrote all this to confirm.