From nobody Fri Apr 10 00:56:45 2026 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C88B81DDA18 for ; Wed, 4 Mar 2026 18:59:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772650773; cv=none; b=P+FQKagYQyWMCpC8yfieAhGAwKY+4F/PR6tH1tdeZ3RcvzEgMHklNhykLswxB5/ZZSJTfQRqlMD3/rHyu++XvzkpaE/45stXGfjC4HoM71w0B1P2Ma/lznGH+0GW3IsWoy6Bx03grp7mSVrQyrb4lvMJuMZEtdTaDvvMWRb2tZs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772650773; c=relaxed/simple; bh=BrsnKsrMSUteCRkCN6uadYfkUhhtrI2ADmNHHN8cdWQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=fTVLCUVwdFkO3vFTTsVtg0D4bIdOsL9I+mNJheaSujI3aE9ncXZXqfA1uZcDh7/u3aa7yrQ31zQ0ePhoCsIRePWpGVAwIvDkpSeiqhSi4cRzAFXvXv9QmYWyXU2Z9DKDPBVlHs2RE/ltR2Ok/iFS/9VzZQXUlgEBFt++XxQaeMU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=QAzlIQKP; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="QAzlIQKP" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1772650770; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=gYPZkt1gtq6YQ3HwfOWxO1iWQMk8wymejJEcZKscvSY=; b=QAzlIQKPvRPT5nJyGUCy1Zjer/zTQyIJnBidbBKqJS+DMIhD2pWAZH+zQdn1+MR7TEBxx8 BXOc+l1kH82Nd8VaPydinACE9AaYKq/+QhetaWJfCYU5PW/p8zzi8U7NPNRdu1UAd615QY Ye+sxzKQ5gs8tRfcpoy4Z/xbM1cNf+w= Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-587-Q8jqWcpoPFSzweBnkTIkTw-1; Wed, 04 Mar 2026 13:59:27 -0500 X-MC-Unique: Q8jqWcpoPFSzweBnkTIkTw-1 X-Mimecast-MFC-AGG-ID: Q8jqWcpoPFSzweBnkTIkTw_1772650766 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 99D2A1800359; Wed, 4 Mar 2026 18:59:26 +0000 (UTC) Received: from pasta.fast.eng.rdu2.dc.redhat.com (unknown [10.44.32.29]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 2808230001A1; Wed, 4 Mar 2026 18:59:24 +0000 (UTC) From: Andreas Gruenbacher To: Carlos Maiolino Cc: Andreas Gruenbacher , linux-xfs@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] xfs: don't clobber bi_status in xfs_zone_alloc_and_submit Date: Wed, 4 Mar 2026 19:59:20 +0100 Message-ID: <20260304185923.291592-1-agruenba@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 Content-Type: text/plain; charset="utf-8" Function xfs_zone_alloc_and_submit() sets bio->bi_status and then it calls bio_io_error() which overwrites that value again. Fix that by completing the bio separately after setting bio->bi_status. Signed-off-by: Andreas Gruenbacher Reviewed-by: "Darrick J. Wong" Reviewed-by: Carlos Maiolino --- fs/xfs/xfs_zone_alloc.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/fs/xfs/xfs_zone_alloc.c b/fs/xfs/xfs_zone_alloc.c index e3d19b6dc64a..c3328b9dda37 100644 --- a/fs/xfs/xfs_zone_alloc.c +++ b/fs/xfs/xfs_zone_alloc.c @@ -862,7 +862,7 @@ xfs_zone_alloc_and_submit( bool is_seq; =20 if (xfs_is_shutdown(mp)) - goto out_error; + goto out_io_error; =20 /* * If we don't have a locally cached zone in this write context, see if @@ -875,7 +875,7 @@ xfs_zone_alloc_and_submit( select_zone: *oz =3D xfs_select_zone(mp, write_hint, pack_tight); if (!*oz) - goto out_error; + goto out_io_error; xfs_set_cached_zone(ip, *oz); } =20 @@ -902,7 +902,10 @@ xfs_zone_alloc_and_submit( =20 out_split_error: ioend->io_bio.bi_status =3D errno_to_blk_status(PTR_ERR(split)); -out_error: + bio_endio(&ioend->io_bio); + return; + +out_io_error: bio_io_error(&ioend->io_bio); } =20 --=20 2.52.0