diff options
author | Marcin Slusarz <marcin.slusarz@gmail.com> | 2008-02-13 18:03:29 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-13 19:21:19 -0500 |
commit | 413d57c9907c72ed608df2be72ef8ed13a3eeb46 (patch) | |
tree | 92f98a1219915d2d72589b24a04232fccf3a40f2 /fs/xfs/xfs_ialloc_btree.c | |
parent | 91d35dd93e14c34539a8005183ea500f25caad02 (diff) |
xfs: convert beX_add to beX_add_cpu (new common API)
remove beX_add functions and replace all uses with beX_add_cpu
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Cc: Mark Fasheh <mark.fasheh@oracle.com>
Reviewed-by: Dave Chinner <dgc@sgi.com>
Cc: Timothy Shimmin <tes@sgi.com>
Cc: <linux-ext4@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/xfs/xfs_ialloc_btree.c')
-rw-r--r-- | fs/xfs/xfs_ialloc_btree.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/fs/xfs/xfs_ialloc_btree.c b/fs/xfs/xfs_ialloc_btree.c index 8cdeeaf8632b..e5310c90e50f 100644 --- a/fs/xfs/xfs_ialloc_btree.c +++ b/fs/xfs/xfs_ialloc_btree.c | |||
@@ -189,7 +189,7 @@ xfs_inobt_delrec( | |||
189 | */ | 189 | */ |
190 | bno = be32_to_cpu(agi->agi_root); | 190 | bno = be32_to_cpu(agi->agi_root); |
191 | agi->agi_root = *pp; | 191 | agi->agi_root = *pp; |
192 | be32_add(&agi->agi_level, -1); | 192 | be32_add_cpu(&agi->agi_level, -1); |
193 | /* | 193 | /* |
194 | * Free the block. | 194 | * Free the block. |
195 | */ | 195 | */ |
@@ -1132,7 +1132,7 @@ xfs_inobt_lshift( | |||
1132 | /* | 1132 | /* |
1133 | * Bump and log left's numrecs, decrement and log right's numrecs. | 1133 | * Bump and log left's numrecs, decrement and log right's numrecs. |
1134 | */ | 1134 | */ |
1135 | be16_add(&left->bb_numrecs, 1); | 1135 | be16_add_cpu(&left->bb_numrecs, 1); |
1136 | xfs_inobt_log_block(cur->bc_tp, lbp, XFS_BB_NUMRECS); | 1136 | xfs_inobt_log_block(cur->bc_tp, lbp, XFS_BB_NUMRECS); |
1137 | #ifdef DEBUG | 1137 | #ifdef DEBUG |
1138 | if (level > 0) | 1138 | if (level > 0) |
@@ -1140,7 +1140,7 @@ xfs_inobt_lshift( | |||
1140 | else | 1140 | else |
1141 | xfs_btree_check_rec(cur->bc_btnum, lrp - 1, lrp); | 1141 | xfs_btree_check_rec(cur->bc_btnum, lrp - 1, lrp); |
1142 | #endif | 1142 | #endif |
1143 | be16_add(&right->bb_numrecs, -1); | 1143 | be16_add_cpu(&right->bb_numrecs, -1); |
1144 | xfs_inobt_log_block(cur->bc_tp, rbp, XFS_BB_NUMRECS); | 1144 | xfs_inobt_log_block(cur->bc_tp, rbp, XFS_BB_NUMRECS); |
1145 | /* | 1145 | /* |
1146 | * Slide the contents of right down one entry. | 1146 | * Slide the contents of right down one entry. |
@@ -1232,7 +1232,7 @@ xfs_inobt_newroot( | |||
1232 | * Set the root data in the a.g. inode structure. | 1232 | * Set the root data in the a.g. inode structure. |
1233 | */ | 1233 | */ |
1234 | agi->agi_root = cpu_to_be32(args.agbno); | 1234 | agi->agi_root = cpu_to_be32(args.agbno); |
1235 | be32_add(&agi->agi_level, 1); | 1235 | be32_add_cpu(&agi->agi_level, 1); |
1236 | xfs_ialloc_log_agi(args.tp, cur->bc_private.i.agbp, | 1236 | xfs_ialloc_log_agi(args.tp, cur->bc_private.i.agbp, |
1237 | XFS_AGI_ROOT | XFS_AGI_LEVEL); | 1237 | XFS_AGI_ROOT | XFS_AGI_LEVEL); |
1238 | /* | 1238 | /* |
@@ -1426,9 +1426,9 @@ xfs_inobt_rshift( | |||
1426 | /* | 1426 | /* |
1427 | * Decrement and log left's numrecs, bump and log right's numrecs. | 1427 | * Decrement and log left's numrecs, bump and log right's numrecs. |
1428 | */ | 1428 | */ |
1429 | be16_add(&left->bb_numrecs, -1); | 1429 | be16_add_cpu(&left->bb_numrecs, -1); |
1430 | xfs_inobt_log_block(cur->bc_tp, lbp, XFS_BB_NUMRECS); | 1430 | xfs_inobt_log_block(cur->bc_tp, lbp, XFS_BB_NUMRECS); |
1431 | be16_add(&right->bb_numrecs, 1); | 1431 | be16_add_cpu(&right->bb_numrecs, 1); |
1432 | #ifdef DEBUG | 1432 | #ifdef DEBUG |
1433 | if (level > 0) | 1433 | if (level > 0) |
1434 | xfs_btree_check_key(cur->bc_btnum, rkp, rkp + 1); | 1434 | xfs_btree_check_key(cur->bc_btnum, rkp, rkp + 1); |
@@ -1529,7 +1529,7 @@ xfs_inobt_split( | |||
1529 | */ | 1529 | */ |
1530 | if ((be16_to_cpu(left->bb_numrecs) & 1) && | 1530 | if ((be16_to_cpu(left->bb_numrecs) & 1) && |
1531 | cur->bc_ptrs[level] <= be16_to_cpu(right->bb_numrecs) + 1) | 1531 | cur->bc_ptrs[level] <= be16_to_cpu(right->bb_numrecs) + 1) |
1532 | be16_add(&right->bb_numrecs, 1); | 1532 | be16_add_cpu(&right->bb_numrecs, 1); |
1533 | i = be16_to_cpu(left->bb_numrecs) - be16_to_cpu(right->bb_numrecs) + 1; | 1533 | i = be16_to_cpu(left->bb_numrecs) - be16_to_cpu(right->bb_numrecs) + 1; |
1534 | /* | 1534 | /* |
1535 | * For non-leaf blocks, copy keys and addresses over to the new block. | 1535 | * For non-leaf blocks, copy keys and addresses over to the new block. |
@@ -1565,7 +1565,7 @@ xfs_inobt_split( | |||
1565 | * Find the left block number by looking in the buffer. | 1565 | * Find the left block number by looking in the buffer. |
1566 | * Adjust numrecs, sibling pointers. | 1566 | * Adjust numrecs, sibling pointers. |
1567 | */ | 1567 | */ |
1568 | be16_add(&left->bb_numrecs, -(be16_to_cpu(right->bb_numrecs))); | 1568 | be16_add_cpu(&left->bb_numrecs, -(be16_to_cpu(right->bb_numrecs))); |
1569 | right->bb_rightsib = left->bb_rightsib; | 1569 | right->bb_rightsib = left->bb_rightsib; |
1570 | left->bb_rightsib = cpu_to_be32(args.agbno); | 1570 | left->bb_rightsib = cpu_to_be32(args.agbno); |
1571 | right->bb_leftsib = cpu_to_be32(lbno); | 1571 | right->bb_leftsib = cpu_to_be32(lbno); |