[PATCH 2/3] xfs_db: fix rdbmap_boundscheck

Darrick J. Wong
2020-05-19T00:52:32Z

From: Darrick J. Wong <darrick.wong@oracle.com>

This predicate should check the a rt block number against number of
rtblocks, not the number of AG blocks. Ooops.

Fixes: 7161cd21b3ed ("xfs_db: bounds-check access to the dbmap array")
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
db/check.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/db/check.c b/db/check.c
index c6fce605..12c03b6d 100644
--- a/db/check.c
+++ b/db/check.c
@@ -1490,7 +1490,7 @@ static inline bool
rdbmap_boundscheck(
xfs_rfsblock_t bno)
{
- return bno < mp->m_sb.sb_agblocks;
+ return bno < mp->m_sb.sb_rblocks;
}

static void