xfs: open code xfs_btree_check_lptr in xfs_bmap_btree_to_extents
authorChristoph Hellwig <hch@lst.de>
Thu, 22 Feb 2024 20:40:53 +0000 (12:40 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Thu, 22 Feb 2024 20:40:53 +0000 (12:40 -0800)
xfs_bmap_btree_to_extents always passes a level of 1 to
xfs_btree_check_lptr, thus making the level check redundant.

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>
fs/xfs/libxfs/xfs_bmap.c

index 6a374a6e858652eec63dfe38ec38b2509688e8fd..5a39fdb5178b59aa279e6055bc91bc75d7d7092d 100644 (file)
@@ -568,7 +568,7 @@ xfs_bmap_btree_to_extents(
        pp = XFS_BMAP_BROOT_PTR_ADDR(mp, rblock, 1, ifp->if_broot_bytes);
        cbno = be64_to_cpu(*pp);
 #ifdef DEBUG
-       if (XFS_IS_CORRUPT(cur->bc_mp, !xfs_btree_check_lptr(cur, cbno, 1))) {
+       if (XFS_IS_CORRUPT(cur->bc_mp, !xfs_verify_fsbno(mp, cbno))) {
                xfs_btree_mark_sick(cur);
                return -EFSCORRUPTED;
        }