]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/xfs/xfs_ialloc_btree.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
[linux-2.6-omap-h63xx.git] / fs / xfs / xfs_ialloc_btree.c
index 9b6de4c2c2bb9977d2eea13d616b5bd6ba20912d..e5310c90e50fc3dbe078b567c5a500cd1047f9e4 100644 (file)
@@ -189,7 +189,7 @@ xfs_inobt_delrec(
                         */
                        bno = be32_to_cpu(agi->agi_root);
                        agi->agi_root = *pp;
-                       be32_add(&agi->agi_level, -1);
+                       be32_add_cpu(&agi->agi_level, -1);
                        /*
                         * Free the block.
                         */
@@ -600,7 +600,7 @@ xfs_inobt_insrec(
        }
 #endif
        nbno = NULLAGBLOCK;
-       ncur = (xfs_btree_cur_t *)0;
+       ncur = NULL;
        /*
         * If the block is full, we can't insert the new entry until we
         * make the block un-full.
@@ -878,7 +878,7 @@ xfs_inobt_lookup(
                 */
                bp = cur->bc_bufs[level];
                if (bp && XFS_BUF_ADDR(bp) != d)
-                       bp = (xfs_buf_t *)0;
+                       bp = NULL;
                if (!bp) {
                        /*
                         * Need to get a new buffer.  Read it, then
@@ -1132,7 +1132,7 @@ xfs_inobt_lshift(
        /*
         * Bump and log left's numrecs, decrement and log right's numrecs.
         */
-       be16_add(&left->bb_numrecs, 1);
+       be16_add_cpu(&left->bb_numrecs, 1);
        xfs_inobt_log_block(cur->bc_tp, lbp, XFS_BB_NUMRECS);
 #ifdef DEBUG
        if (level > 0)
@@ -1140,7 +1140,7 @@ xfs_inobt_lshift(
        else
                xfs_btree_check_rec(cur->bc_btnum, lrp - 1, lrp);
 #endif
-       be16_add(&right->bb_numrecs, -1);
+       be16_add_cpu(&right->bb_numrecs, -1);
        xfs_inobt_log_block(cur->bc_tp, rbp, XFS_BB_NUMRECS);
        /*
         * Slide the contents of right down one entry.
@@ -1232,7 +1232,7 @@ xfs_inobt_newroot(
         * Set the root data in the a.g. inode structure.
         */
        agi->agi_root = cpu_to_be32(args.agbno);
-       be32_add(&agi->agi_level, 1);
+       be32_add_cpu(&agi->agi_level, 1);
        xfs_ialloc_log_agi(args.tp, cur->bc_private.i.agbp,
                XFS_AGI_ROOT | XFS_AGI_LEVEL);
        /*
@@ -1426,9 +1426,9 @@ xfs_inobt_rshift(
        /*
         * Decrement and log left's numrecs, bump and log right's numrecs.
         */
-       be16_add(&left->bb_numrecs, -1);
+       be16_add_cpu(&left->bb_numrecs, -1);
        xfs_inobt_log_block(cur->bc_tp, lbp, XFS_BB_NUMRECS);
-       be16_add(&right->bb_numrecs, 1);
+       be16_add_cpu(&right->bb_numrecs, 1);
 #ifdef DEBUG
        if (level > 0)
                xfs_btree_check_key(cur->bc_btnum, rkp, rkp + 1);
@@ -1529,7 +1529,7 @@ xfs_inobt_split(
         */
        if ((be16_to_cpu(left->bb_numrecs) & 1) &&
            cur->bc_ptrs[level] <= be16_to_cpu(right->bb_numrecs) + 1)
-               be16_add(&right->bb_numrecs, 1);
+               be16_add_cpu(&right->bb_numrecs, 1);
        i = be16_to_cpu(left->bb_numrecs) - be16_to_cpu(right->bb_numrecs) + 1;
        /*
         * For non-leaf blocks, copy keys and addresses over to the new block.
@@ -1565,7 +1565,7 @@ xfs_inobt_split(
         * Find the left block number by looking in the buffer.
         * Adjust numrecs, sibling pointers.
         */
-       be16_add(&left->bb_numrecs, -(be16_to_cpu(right->bb_numrecs)));
+       be16_add_cpu(&left->bb_numrecs, -(be16_to_cpu(right->bb_numrecs)));
        right->bb_rightsib = left->bb_rightsib;
        left->bb_rightsib = cpu_to_be32(args.agbno);
        right->bb_leftsib = cpu_to_be32(lbno);
@@ -1933,7 +1933,7 @@ xfs_inobt_insert(
        nrec.ir_startino = cpu_to_be32(cur->bc_rec.i.ir_startino);
        nrec.ir_freecount = cpu_to_be32(cur->bc_rec.i.ir_freecount);
        nrec.ir_free = cpu_to_be64(cur->bc_rec.i.ir_free);
-       ncur = (xfs_btree_cur_t *)0;
+       ncur = NULL;
        pcur = cur;
        /*
         * Loop going up the tree, starting at the leaf level.
@@ -1965,7 +1965,7 @@ xfs_inobt_insert(
                 */
                if (ncur) {
                        pcur = ncur;
-                       ncur = (xfs_btree_cur_t *)0;
+                       ncur = NULL;
                }
        } while (nbno != NULLAGBLOCK);
        *stat = i;