diff options
Diffstat (limited to 'fs/xfs/xfs_bmap.c')
-rw-r--r-- | fs/xfs/xfs_bmap.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/fs/xfs/xfs_bmap.c b/fs/xfs/xfs_bmap.c index bce8e3bd8ad1..7d683e0b8ef7 100644 --- a/fs/xfs/xfs_bmap.c +++ b/fs/xfs/xfs_bmap.c | |||
@@ -6194,7 +6194,7 @@ xfs_bmap_check_leaf_extents( | |||
6194 | xfs_mount_t *mp; /* file system mount structure */ | 6194 | xfs_mount_t *mp; /* file system mount structure */ |
6195 | __be64 *pp; /* pointer to block address */ | 6195 | __be64 *pp; /* pointer to block address */ |
6196 | xfs_bmbt_rec_t *ep; /* pointer to current extent */ | 6196 | xfs_bmbt_rec_t *ep; /* pointer to current extent */ |
6197 | xfs_bmbt_rec_t *lastp; /* pointer to previous extent */ | 6197 | xfs_bmbt_rec_t last = {0, 0}; /* last extent in prev block */ |
6198 | xfs_bmbt_rec_t *nextp; /* pointer to next extent */ | 6198 | xfs_bmbt_rec_t *nextp; /* pointer to next extent */ |
6199 | int bp_release = 0; | 6199 | int bp_release = 0; |
6200 | 6200 | ||
@@ -6264,7 +6264,6 @@ xfs_bmap_check_leaf_extents( | |||
6264 | /* | 6264 | /* |
6265 | * Loop over all leaf nodes checking that all extents are in the right order. | 6265 | * Loop over all leaf nodes checking that all extents are in the right order. |
6266 | */ | 6266 | */ |
6267 | lastp = NULL; | ||
6268 | for (;;) { | 6267 | for (;;) { |
6269 | xfs_fsblock_t nextbno; | 6268 | xfs_fsblock_t nextbno; |
6270 | xfs_extnum_t num_recs; | 6269 | xfs_extnum_t num_recs; |
@@ -6285,18 +6284,16 @@ xfs_bmap_check_leaf_extents( | |||
6285 | */ | 6284 | */ |
6286 | 6285 | ||
6287 | ep = XFS_BTREE_REC_ADDR(xfs_bmbt, block, 1); | 6286 | ep = XFS_BTREE_REC_ADDR(xfs_bmbt, block, 1); |
6287 | if (i) { | ||
6288 | xfs_btree_check_rec(XFS_BTNUM_BMAP, &last, ep); | ||
6289 | } | ||
6288 | for (j = 1; j < num_recs; j++) { | 6290 | for (j = 1; j < num_recs; j++) { |
6289 | nextp = XFS_BTREE_REC_ADDR(xfs_bmbt, block, j + 1); | 6291 | nextp = XFS_BTREE_REC_ADDR(xfs_bmbt, block, j + 1); |
6290 | if (lastp) { | 6292 | xfs_btree_check_rec(XFS_BTNUM_BMAP, ep, nextp); |
6291 | xfs_btree_check_rec(XFS_BTNUM_BMAP, | ||
6292 | (void *)lastp, (void *)ep); | ||
6293 | } | ||
6294 | xfs_btree_check_rec(XFS_BTNUM_BMAP, (void *)ep, | ||
6295 | (void *)(nextp)); | ||
6296 | lastp = ep; | ||
6297 | ep = nextp; | 6293 | ep = nextp; |
6298 | } | 6294 | } |
6299 | 6295 | ||
6296 | last = *ep; | ||
6300 | i += num_recs; | 6297 | i += num_recs; |
6301 | if (bp_release) { | 6298 | if (bp_release) { |
6302 | bp_release = 0; | 6299 | bp_release = 0; |