From: Christoph Hellwig Date: Thu, 22 Feb 2024 20:40:53 +0000 (-0800) Subject: xfs: open code xfs_btree_check_lptr in xfs_bmap_btree_to_extents X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=fb0793f206701a68f8588a09bf32f7cf44878ea3;p=linux.git xfs: open code xfs_btree_check_lptr in xfs_bmap_btree_to_extents 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 Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong --- diff --git a/fs/xfs/libxfs/xfs_bmap.c b/fs/xfs/libxfs/xfs_bmap.c index 6a374a6e85865..5a39fdb5178b5 100644 --- a/fs/xfs/libxfs/xfs_bmap.c +++ b/fs/xfs/libxfs/xfs_bmap.c @@ -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; }