Commit c94312de authored by Ruben Porras's avatar Ruben Porras Committed by Lachlan McIlroy

[XFS] Make xfs_bmap_*_count_leaves void.

xfs_bmap_count_leaves and xfs_bmap_disk_count_leaves always return always
0, make them void.

SGI-PV: 981498

SGI-Modid: xfs-linux-melb:xfs-kern:31844a
Signed-off-by: default avatarRuben Porras <ruben.porras@linworks.de>
Signed-off-by: default avatarDonald Douwsma <donaldd@sgi.com>
Signed-off-by: default avatarLachlan McIlroy <lachlan@sgi.com>
parent 5695ef46
...@@ -384,14 +384,14 @@ xfs_bmap_count_tree( ...@@ -384,14 +384,14 @@ xfs_bmap_count_tree(
int levelin, int levelin,
int *count); int *count);
STATIC int STATIC void
xfs_bmap_count_leaves( xfs_bmap_count_leaves(
xfs_ifork_t *ifp, xfs_ifork_t *ifp,
xfs_extnum_t idx, xfs_extnum_t idx,
int numrecs, int numrecs,
int *count); int *count);
STATIC int STATIC void
xfs_bmap_disk_count_leaves( xfs_bmap_disk_count_leaves(
xfs_extnum_t idx, xfs_extnum_t idx,
xfs_bmbt_block_t *block, xfs_bmbt_block_t *block,
...@@ -6367,13 +6367,9 @@ xfs_bmap_count_blocks( ...@@ -6367,13 +6367,9 @@ xfs_bmap_count_blocks(
mp = ip->i_mount; mp = ip->i_mount;
ifp = XFS_IFORK_PTR(ip, whichfork); ifp = XFS_IFORK_PTR(ip, whichfork);
if ( XFS_IFORK_FORMAT(ip, whichfork) == XFS_DINODE_FMT_EXTENTS ) { if ( XFS_IFORK_FORMAT(ip, whichfork) == XFS_DINODE_FMT_EXTENTS ) {
if (unlikely(xfs_bmap_count_leaves(ifp, 0, xfs_bmap_count_leaves(ifp, 0,
ifp->if_bytes / (uint)sizeof(xfs_bmbt_rec_t), ifp->if_bytes / (uint)sizeof(xfs_bmbt_rec_t),
count) < 0)) { count);
XFS_ERROR_REPORT("xfs_bmap_count_blocks(1)",
XFS_ERRLEVEL_LOW, mp);
return XFS_ERROR(EFSCORRUPTED);
}
return 0; return 0;
} }
...@@ -6454,13 +6450,7 @@ xfs_bmap_count_tree( ...@@ -6454,13 +6450,7 @@ xfs_bmap_count_tree(
for (;;) { for (;;) {
nextbno = be64_to_cpu(block->bb_rightsib); nextbno = be64_to_cpu(block->bb_rightsib);
numrecs = be16_to_cpu(block->bb_numrecs); numrecs = be16_to_cpu(block->bb_numrecs);
if (unlikely(xfs_bmap_disk_count_leaves(0, xfs_bmap_disk_count_leaves(0, block, numrecs, count);
block, numrecs, count) < 0)) {
xfs_trans_brelse(tp, bp);
XFS_ERROR_REPORT("xfs_bmap_count_tree(2)",
XFS_ERRLEVEL_LOW, mp);
return XFS_ERROR(EFSCORRUPTED);
}
xfs_trans_brelse(tp, bp); xfs_trans_brelse(tp, bp);
if (nextbno == NULLFSBLOCK) if (nextbno == NULLFSBLOCK)
break; break;
...@@ -6478,7 +6468,7 @@ xfs_bmap_count_tree( ...@@ -6478,7 +6468,7 @@ xfs_bmap_count_tree(
/* /*
* Count leaf blocks given a range of extent records. * Count leaf blocks given a range of extent records.
*/ */
STATIC int STATIC void
xfs_bmap_count_leaves( xfs_bmap_count_leaves(
xfs_ifork_t *ifp, xfs_ifork_t *ifp,
xfs_extnum_t idx, xfs_extnum_t idx,
...@@ -6491,14 +6481,13 @@ xfs_bmap_count_leaves( ...@@ -6491,14 +6481,13 @@ xfs_bmap_count_leaves(
xfs_bmbt_rec_host_t *frp = xfs_iext_get_ext(ifp, idx + b); xfs_bmbt_rec_host_t *frp = xfs_iext_get_ext(ifp, idx + b);
*count += xfs_bmbt_get_blockcount(frp); *count += xfs_bmbt_get_blockcount(frp);
} }
return 0;
} }
/* /*
* Count leaf blocks given a range of extent records originally * Count leaf blocks given a range of extent records originally
* in btree format. * in btree format.
*/ */
STATIC int STATIC void
xfs_bmap_disk_count_leaves( xfs_bmap_disk_count_leaves(
xfs_extnum_t idx, xfs_extnum_t idx,
xfs_bmbt_block_t *block, xfs_bmbt_block_t *block,
...@@ -6512,5 +6501,4 @@ xfs_bmap_disk_count_leaves( ...@@ -6512,5 +6501,4 @@ xfs_bmap_disk_count_leaves(
frp = XFS_BTREE_REC_ADDR(xfs_bmbt, block, idx + b); frp = XFS_BTREE_REC_ADDR(xfs_bmbt, block, idx + b);
*count += xfs_bmbt_disk_get_blockcount(frp); *count += xfs_bmbt_disk_get_blockcount(frp);
} }
return 0;
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment