aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_alloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_alloc.c')
-rw-r--r--fs/xfs/xfs_alloc.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/fs/xfs/xfs_alloc.c b/fs/xfs/xfs_alloc.c
index 0a2a87208b17..c47ce9075728 100644
--- a/fs/xfs/xfs_alloc.c
+++ b/fs/xfs/xfs_alloc.c
@@ -380,21 +380,20 @@ xfs_alloc_fixup_trees(
380 return error; 380 return error;
381 XFS_WANT_CORRUPTED_RETURN(i == 1); 381 XFS_WANT_CORRUPTED_RETURN(i == 1);
382 } 382 }
383
383#ifdef DEBUG 384#ifdef DEBUG
384 { 385 if (bno_cur->bc_nlevels == 1 && cnt_cur->bc_nlevels == 1) {
385 xfs_alloc_block_t *bnoblock; 386 struct xfs_btree_block *bnoblock;
386 xfs_alloc_block_t *cntblock; 387 struct xfs_btree_block *cntblock;
387 388
388 if (bno_cur->bc_nlevels == 1 && 389 bnoblock = XFS_BUF_TO_BLOCK(bno_cur->bc_bufs[0]);
389 cnt_cur->bc_nlevels == 1) { 390 cntblock = XFS_BUF_TO_BLOCK(cnt_cur->bc_bufs[0]);
390 bnoblock = XFS_BUF_TO_ALLOC_BLOCK(bno_cur->bc_bufs[0]); 391
391 cntblock = XFS_BUF_TO_ALLOC_BLOCK(cnt_cur->bc_bufs[0]); 392 XFS_WANT_CORRUPTED_RETURN(
392 XFS_WANT_CORRUPTED_RETURN( 393 bnoblock->bb_numrecs == cntblock->bb_numrecs);
393 be16_to_cpu(bnoblock->bb_numrecs) ==
394 be16_to_cpu(cntblock->bb_numrecs));
395 }
396 } 394 }
397#endif 395#endif
396
398 /* 397 /*
399 * Deal with all four cases: the allocated record is contained 398 * Deal with all four cases: the allocated record is contained
400 * within the freespace record, so we can have new freespace 399 * within the freespace record, so we can have new freespace