xfs: assert a valid limit in xfs_rtfind_forw

Protect against developers passing stupid limits when refactoring the
RT code once again.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
This commit is contained in:
Christoph Hellwig 2024-08-30 15:36:54 -07:00 committed by Darrick J. Wong
parent 119c65e56b
commit 6d2db12d56

View File

@ -315,6 +315,8 @@ xfs_rtfind_forw(
xfs_rtword_t incore;
unsigned int word; /* word number in the buffer */
ASSERT(start <= limit);
/*
* Compute and read in starting bitmap block for starting block.
*/