]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
xfs: use rtrefcount btree cursor in xchk_xref_is_rt_cow_staging
authorDarrick J. Wong <djwong@kernel.org>
Tue, 14 Jul 2026 06:05:10 +0000 (23:05 -0700)
committerCarlos Maiolino <cem@kernel.org>
Tue, 14 Jul 2026 09:01:47 +0000 (11:01 +0200)
LOLLM points out that we pass the wrong btree cursor here.  We want the
rtrefcount btree cursor, not the non-rt one.  This is fairly benign
since it only affects tracing data.

Cc: stable@vger.kernel.org # v6.14
Fixes: 91683bb3f264c0 ("xfs: cross-reference checks with the rt refcount btree")
Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Assisted-by: LOLLM # finding obvious bugs
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
fs/xfs/scrub/rtrefcount.c

index 0d10ce2910c2cbb41c9448c2208989cfde305cd0..4e7c540c8d2307e4781258f812a82fa10bd6eca7 100644 (file)
@@ -607,7 +607,7 @@ xchk_xref_is_rt_cow_staging(
 
        /* CoW lookup returned a shared extent record? */
        if (rc.rc_domain != XFS_REFC_DOMAIN_COW)
-               xchk_btree_xref_set_corrupt(sc, sc->sa.refc_cur, 0);
+               xchk_btree_xref_set_corrupt(sc, sc->sr.refc_cur, 0);
 
        /* Must be at least as long as what was passed in */
        if (rc.rc_blockcount < len)