]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
xfs: write the rg superblock when fixing it
authorDarrick J. Wong <djwong@kernel.org>
Tue, 14 Jul 2026 06:05:41 +0000 (23:05 -0700)
committerCarlos Maiolino <cem@kernel.org>
Tue, 14 Jul 2026 09:01:47 +0000 (11:01 +0200)
The rtgroup superblock fixer should write the rtgroup superblock.
LOLLM noticed this, oops. :/

Cc: stable@vger.kernel.org # v6.13
Fixes: 1433f8f9cead37 ("xfs: repair realtime group superblock")
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/rgsuper.c

index 482f899a518a8533264edc5afc0b63798ff5d90d..3dad6e5da74e5509defc9070c01ad92fd1fb4c12 100644 (file)
@@ -80,9 +80,13 @@ int
 xrep_rgsuperblock(
        struct xfs_scrub        *sc)
 {
+       struct xfs_buf          *sb_bp;
+
        ASSERT(rtg_rgno(sc->sr.rtg) == 0);
 
+       sb_bp = xfs_trans_getsb(sc->tp);
        xfs_log_sb(sc->tp);
+       xfs_log_rtsb(sc->tp, sb_bp);
        return 0;
 }
 #endif /* CONFIG_XFS_ONLINE_REPAIR */