From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1793805412; b=izIJeIxAmvPKMg2PEeUp3Vf2XU6EMjGe808VJCtgM6IdcoNINjqeJ0CxBR0quVyCbK4v aLjoZEgDFFzZc9vQePDYXUTbZYYPZEjP4mU5xekJBw9Bri5uci3/iKPUs3lAOZoddsidJ MVYHQ46ne8oMKwXvvqXTNhIR9lciyEBQ5ssSMji3ho8XysmzULO1eW9+UCejp/cWdwmLn QKyGxdZkNMA8EOnFqJ6Pz6b1Tt6R1BCjYLlBBeNvM5HCdj6wCcaN3HBGiNE+obi8Zll3l UA4fXUDgVTtySgkoopdZD944G2Jr0Xh48vC84Kr9yemGBjFHamvyU6b11+nyMFRvPEw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793805412; h=Received:DKIM-Signature:Subject:To:Cc:From:Date:Message-ID: MIME-Version:Content-Type:Content-Transfer-Encoding; bh=o3GROl9226X8kQenVGUjYvgDixDCnvI6Yf/uylUE2Jc=; b=CX0E5W9aqr0CcpesMfVibD4W8vGAqxo+brqcc/Tq5NurmiVRX/s/l2G20jrPVJsiunk2 3bBGi2dbmp3/akjONXUlLLU+h/GrBdrsCVwqbaL0EmV9ecyK4Ra27KyVa8aHjy1u7+Q2E aHHjm4WDmjY69+AMfLRxgFDroVaxEH0YAUBNHeSdTfcTyerrlbEaC1A5hyk1J8n/HFhNt qkpFM0W7sd39uG43ckugMiw3cfhHjZDyaxBtWZGyWAVecuSkSV4FrZkoQ5vlcVWM9naFN Ol1Fkqrv9B6MWoyLyOxwpqsRbxITc0XO2XK8KF0DMKCBDQbRCu0xQMeGW+cAVOzaJCA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=cGQY4zyk; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8F3B46074759 for ; Wed, 4 Nov 2026 15:16:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=cGQY4zyk Received: by smtp.kernel.org (Postfix) with ESMTPSA id BD91D1F000C1; Wed, 4 Nov 2026 15:16:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1793805412; bh=o3GROl9226X8kQenVGUjYvgDixDCnvI6Yf/uylUE2Jc=; h=Subject:To:Cc:From:Date; b=cGQY4zyk+gGKf0DQiEIBdDj869rP5qV4nmgf/+CMgh5b6UI37X/nsf/xIAEIMslrg TA5Rc2vK9txxk9i4y9LMUU16g4eww0fhnEAG1kRO8kR4OSX/uLzc/CJYmebxrnBfg7 G+u4fQel+BROb/W6X7HyeHE/tesPwY1/8Dorw9E4= Subject: FAILED: patch "[PATCH] xfs: cross-reference the primary superblock" failed to apply to 5.10-stable tree To: djwong@kernel.org,cem@kernel.org,hch@lst.de Cc: From: Date: Wed, 04 Nov 2026 16:16:41 +0100 Message-ID: <2026110441-writing-graceful-7908@gregkh> X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit The patch below does not apply to the 5.10-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . To reproduce the conflict and resubmit, you may use the following commands: git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.10.y git checkout FETCH_HEAD git cherry-pick -x 0c61016006ab08f8346f9e7b1e38559bd4ea499e # git commit -s git send-email --to '' --in-reply-to '2026110441-writing-graceful-7908@gregkh' --subject-prefix 'PATCH 5.10.y' 'HEAD^..' Possible dependencies: thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From 0c61016006ab08f8346f9e7b1e38559bd4ea499e Mon Sep 17 00:00:00 2001 From: "Darrick J. Wong" Date: Thu, 24 Sep 2026 21:11:32 -0700 Subject: [PATCH] xfs: cross-reference the primary superblock Make sure we cross-reference the primary superblock against the rest of the AG 0 space metadata. Drop the unused @bp parameter of xchk_superblock_xref to avoid complaints about uninitialized variables. Cc: stable@vger.kernel.org # v4.16 Fixes: 52dc4b44af7419 ("xfs: cross-reference with the bnobt") Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Carlos Maiolino diff --git a/fs/xfs/scrub/agheader.c b/fs/xfs/scrub/agheader.c index fa5d32ec020a..1dff6cb1b936 100644 --- a/fs/xfs/scrub/agheader.c +++ b/fs/xfs/scrub/agheader.c @@ -35,8 +35,7 @@ xchk_setup_agheader( /* Cross-reference with the other btrees. */ STATIC void xchk_superblock_xref( - struct xfs_scrub *sc, - struct xfs_buf *bp) + struct xfs_scrub *sc) { struct xfs_mount *mp = sc->mp; xfs_agnumber_t agno = sc->sm->sm_agno; @@ -106,16 +105,12 @@ xchk_superblock( struct xfs_dsb *sb; struct xfs_perag *pag; size_t sblen; - xfs_agnumber_t agno; + xfs_agnumber_t agno = sc->sm->sm_agno; uint32_t v2_ok; __be32 features_mask; int error; __be16 vernum_mask; - agno = sc->sm->sm_agno; - if (agno == 0) - return 0; - /* * Grab an active reference to the perag structure. If we can't get * it, we're racing with something that's tearing down the AG, so @@ -125,6 +120,9 @@ xchk_superblock( if (!pag) return -ENOENT; + if (agno == 0) + goto out_xref; + error = xfs_sb_read_secondary(mp, sc->tp, agno, &bp); /* * The superblock verifier can return several different error codes @@ -430,7 +428,8 @@ xchk_superblock( if (memchr_inv((char *)sb + sblen, 0, BBTOB(bp->b_length) - sblen)) xchk_block_set_corrupt(sc, bp); - xchk_superblock_xref(sc, bp); +out_xref: + xchk_superblock_xref(sc); out_pag: xfs_perag_put(pag); return error;