]> git.apps.os.sepia.ceph.com Git - xfsprogs-dev.git/commitdiff
xfs: open code xfs_btree_check_lptr in xfs_bmap_btree_to_extents
authorChristoph Hellwig <hch@lst.de>
Mon, 22 Apr 2024 17:01:07 +0000 (10:01 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Mon, 3 Jun 2024 18:37:39 +0000 (11:37 -0700)
Source kernel commit: fb0793f206701a68f8588a09bf32f7cf44878ea3

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>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
libxfs/xfs_bmap.c

index 2d332989be3629156335c7f95368b3397c36b9c3..86643f4c3fde2e6f6ac67072afc2e2627dd9fbc6 100644 (file)
@@ -562,7 +562,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;
        }