From dba7a51a4f96b67f8c6b2a95465839a2895ccba6 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Thu, 10 Oct 2024 13:16:43 +0200 Subject: [PATCH] fixup open code xfs_rgbno_to_daddr --- libxfs/init.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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; -- 2.50.1