Re: [RFC 06/12] bio: don't check target->bi_status on error

From: Christoph Hellwig

Date: Thu Dec 18 2025 - 03:48:12 EST


On Tue, Dec 16, 2025 at 12:20:07PM +0100, Andreas Gruenbacher wrote:
> > I still don't understand what you're saying here at all, or what this is
> > trying to fix or optimize.
>
> When we have this construct in the code and we know that status is not 0:
>
> if (!bio->bi_status)
> bio->bi_status = status;
>
> we can just do this instead:
>
> bio>bi_status = status;

But this now overrides the previous status instead of preserving the
first error?