diff options
Diffstat (limited to 'fs/xfs/xfs_alloc_btree.c')
-rw-r--r-- | fs/xfs/xfs_alloc_btree.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/fs/xfs/xfs_alloc_btree.c b/fs/xfs/xfs_alloc_btree.c index 1603ce595853..3ce2645508ae 100644 --- a/fs/xfs/xfs_alloc_btree.c +++ b/fs/xfs/xfs_alloc_btree.c | |||
@@ -221,7 +221,7 @@ xfs_alloc_delrec( | |||
221 | */ | 221 | */ |
222 | bno = be32_to_cpu(agf->agf_roots[cur->bc_btnum]); | 222 | bno = be32_to_cpu(agf->agf_roots[cur->bc_btnum]); |
223 | agf->agf_roots[cur->bc_btnum] = *lpp; | 223 | agf->agf_roots[cur->bc_btnum] = *lpp; |
224 | be32_add(&agf->agf_levels[cur->bc_btnum], -1); | 224 | be32_add_cpu(&agf->agf_levels[cur->bc_btnum], -1); |
225 | mp->m_perag[be32_to_cpu(agf->agf_seqno)].pagf_levels[cur->bc_btnum]--; | 225 | mp->m_perag[be32_to_cpu(agf->agf_seqno)].pagf_levels[cur->bc_btnum]--; |
226 | /* | 226 | /* |
227 | * Put this buffer/block on the ag's freelist. | 227 | * Put this buffer/block on the ag's freelist. |
@@ -1256,9 +1256,9 @@ xfs_alloc_lshift( | |||
1256 | /* | 1256 | /* |
1257 | * Bump and log left's numrecs, decrement and log right's numrecs. | 1257 | * Bump and log left's numrecs, decrement and log right's numrecs. |
1258 | */ | 1258 | */ |
1259 | be16_add(&left->bb_numrecs, 1); | 1259 | be16_add_cpu(&left->bb_numrecs, 1); |
1260 | xfs_alloc_log_block(cur->bc_tp, lbp, XFS_BB_NUMRECS); | 1260 | xfs_alloc_log_block(cur->bc_tp, lbp, XFS_BB_NUMRECS); |
1261 | be16_add(&right->bb_numrecs, -1); | 1261 | be16_add_cpu(&right->bb_numrecs, -1); |
1262 | xfs_alloc_log_block(cur->bc_tp, rbp, XFS_BB_NUMRECS); | 1262 | xfs_alloc_log_block(cur->bc_tp, rbp, XFS_BB_NUMRECS); |
1263 | /* | 1263 | /* |
1264 | * Slide the contents of right down one entry. | 1264 | * Slide the contents of right down one entry. |
@@ -1346,7 +1346,7 @@ xfs_alloc_newroot( | |||
1346 | 1346 | ||
1347 | agf = XFS_BUF_TO_AGF(cur->bc_private.a.agbp); | 1347 | agf = XFS_BUF_TO_AGF(cur->bc_private.a.agbp); |
1348 | agf->agf_roots[cur->bc_btnum] = cpu_to_be32(nbno); | 1348 | agf->agf_roots[cur->bc_btnum] = cpu_to_be32(nbno); |
1349 | be32_add(&agf->agf_levels[cur->bc_btnum], 1); | 1349 | be32_add_cpu(&agf->agf_levels[cur->bc_btnum], 1); |
1350 | seqno = be32_to_cpu(agf->agf_seqno); | 1350 | seqno = be32_to_cpu(agf->agf_seqno); |
1351 | mp->m_perag[seqno].pagf_levels[cur->bc_btnum]++; | 1351 | mp->m_perag[seqno].pagf_levels[cur->bc_btnum]++; |
1352 | xfs_alloc_log_agf(cur->bc_tp, cur->bc_private.a.agbp, | 1352 | xfs_alloc_log_agf(cur->bc_tp, cur->bc_private.a.agbp, |
@@ -1558,9 +1558,9 @@ xfs_alloc_rshift( | |||
1558 | /* | 1558 | /* |
1559 | * Decrement and log left's numrecs, bump and log right's numrecs. | 1559 | * Decrement and log left's numrecs, bump and log right's numrecs. |
1560 | */ | 1560 | */ |
1561 | be16_add(&left->bb_numrecs, -1); | 1561 | be16_add_cpu(&left->bb_numrecs, -1); |
1562 | xfs_alloc_log_block(cur->bc_tp, lbp, XFS_BB_NUMRECS); | 1562 | xfs_alloc_log_block(cur->bc_tp, lbp, XFS_BB_NUMRECS); |
1563 | be16_add(&right->bb_numrecs, 1); | 1563 | be16_add_cpu(&right->bb_numrecs, 1); |
1564 | xfs_alloc_log_block(cur->bc_tp, rbp, XFS_BB_NUMRECS); | 1564 | xfs_alloc_log_block(cur->bc_tp, rbp, XFS_BB_NUMRECS); |
1565 | /* | 1565 | /* |
1566 | * Using a temporary cursor, update the parent key values of the | 1566 | * Using a temporary cursor, update the parent key values of the |
@@ -1643,7 +1643,7 @@ xfs_alloc_split( | |||
1643 | */ | 1643 | */ |
1644 | if ((be16_to_cpu(left->bb_numrecs) & 1) && | 1644 | if ((be16_to_cpu(left->bb_numrecs) & 1) && |
1645 | cur->bc_ptrs[level] <= be16_to_cpu(right->bb_numrecs) + 1) | 1645 | cur->bc_ptrs[level] <= be16_to_cpu(right->bb_numrecs) + 1) |
1646 | be16_add(&right->bb_numrecs, 1); | 1646 | be16_add_cpu(&right->bb_numrecs, 1); |
1647 | i = be16_to_cpu(left->bb_numrecs) - be16_to_cpu(right->bb_numrecs) + 1; | 1647 | i = be16_to_cpu(left->bb_numrecs) - be16_to_cpu(right->bb_numrecs) + 1; |
1648 | /* | 1648 | /* |
1649 | * For non-leaf blocks, copy keys and addresses over to the new block. | 1649 | * For non-leaf blocks, copy keys and addresses over to the new block. |
@@ -1689,7 +1689,7 @@ xfs_alloc_split( | |||
1689 | * Adjust numrecs, sibling pointers. | 1689 | * Adjust numrecs, sibling pointers. |
1690 | */ | 1690 | */ |
1691 | lbno = XFS_DADDR_TO_AGBNO(cur->bc_mp, XFS_BUF_ADDR(lbp)); | 1691 | lbno = XFS_DADDR_TO_AGBNO(cur->bc_mp, XFS_BUF_ADDR(lbp)); |
1692 | be16_add(&left->bb_numrecs, -(be16_to_cpu(right->bb_numrecs))); | 1692 | be16_add_cpu(&left->bb_numrecs, -(be16_to_cpu(right->bb_numrecs))); |
1693 | right->bb_rightsib = left->bb_rightsib; | 1693 | right->bb_rightsib = left->bb_rightsib; |
1694 | left->bb_rightsib = cpu_to_be32(rbno); | 1694 | left->bb_rightsib = cpu_to_be32(rbno); |
1695 | right->bb_leftsib = cpu_to_be32(lbno); | 1695 | right->bb_leftsib = cpu_to_be32(lbno); |