From: Christoph Hellwig Date: Thu, 10 Oct 2024 11:16:43 +0000 (+0200) Subject: fixup X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=refs%2Fheads%2Fxfs-rtg-cleanups;p=users%2Fhch%2Fxfsprogs.git fixup open code xfs_rgbno_to_daddr --- diff --git a/libxfs/init.c b/libxfs/init.c index 7a0adb410..4975e9459 100644 --- a/libxfs/init.c +++ b/libxfs/init.c @@ -672,6 +672,7 @@ check_many_rtgroups( struct xfs_mount *mp, struct xfs_sb *sbp) { + xfs_rtblock_t rtbno; struct xfs_buf *bp; int error; @@ -685,9 +686,11 @@ check_many_rtgroups( return true; } - error = libxfs_buf_read(mp->m_rtdev, - xfs_rgbno_to_daddr(mp, sbp->sb_rgcount - 1, 0), 1, 0, - &bp, NULL); + rtbno = ((xfs_rtblock_t)(sbp->sb_rgcount - 1)) << + mp->m_groups[XG_TYPE_RTG].blklog; + + error = libxfs_buf_read(mp->m_rtdev, xfs_rtb_to_daddr(mp, rtbno), + 1, 0, &bp, NULL); if (!error) { libxfs_buf_relse(bp); return true;