aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_dir2_leaf.c
diff options
context:
space:
mode:
authorMarcin Slusarz <marcin.slusarz@gmail.com>2008-02-13 18:03:29 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-13 19:21:19 -0500
commit413d57c9907c72ed608df2be72ef8ed13a3eeb46 (patch)
tree92f98a1219915d2d72589b24a04232fccf3a40f2 /fs/xfs/xfs_dir2_leaf.c
parent91d35dd93e14c34539a8005183ea500f25caad02 (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_dir2_leaf.c')
-rw-r--r--fs/xfs/xfs_dir2_leaf.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/fs/xfs/xfs_dir2_leaf.c b/fs/xfs/xfs_dir2_leaf.c
index 0ca0020ba09f..bc52b803d79b 100644
--- a/fs/xfs/xfs_dir2_leaf.c
+++ b/fs/xfs/xfs_dir2_leaf.c
@@ -359,7 +359,7 @@ xfs_dir2_leaf_addname(
359 bestsp--; 359 bestsp--;
360 memmove(&bestsp[0], &bestsp[1], 360 memmove(&bestsp[0], &bestsp[1],
361 be32_to_cpu(ltp->bestcount) * sizeof(bestsp[0])); 361 be32_to_cpu(ltp->bestcount) * sizeof(bestsp[0]));
362 be32_add(&ltp->bestcount, 1); 362 be32_add_cpu(&ltp->bestcount, 1);
363 xfs_dir2_leaf_log_tail(tp, lbp); 363 xfs_dir2_leaf_log_tail(tp, lbp);
364 xfs_dir2_leaf_log_bests(tp, lbp, 0, be32_to_cpu(ltp->bestcount) - 1); 364 xfs_dir2_leaf_log_bests(tp, lbp, 0, be32_to_cpu(ltp->bestcount) - 1);
365 } 365 }
@@ -445,7 +445,7 @@ xfs_dir2_leaf_addname(
445 */ 445 */
446 lfloglow = index; 446 lfloglow = index;
447 lfloghigh = be16_to_cpu(leaf->hdr.count); 447 lfloghigh = be16_to_cpu(leaf->hdr.count);
448 be16_add(&leaf->hdr.count, 1); 448 be16_add_cpu(&leaf->hdr.count, 1);
449 } 449 }
450 /* 450 /*
451 * There are stale entries. 451 * There are stale entries.
@@ -523,7 +523,7 @@ xfs_dir2_leaf_addname(
523 lfloglow = MIN(index, lfloglow); 523 lfloglow = MIN(index, lfloglow);
524 lfloghigh = MAX(highstale, lfloghigh); 524 lfloghigh = MAX(highstale, lfloghigh);
525 } 525 }
526 be16_add(&leaf->hdr.stale, -1); 526 be16_add_cpu(&leaf->hdr.stale, -1);
527 } 527 }
528 /* 528 /*
529 * Fill in the new leaf entry. 529 * Fill in the new leaf entry.
@@ -626,7 +626,7 @@ xfs_dir2_leaf_compact(
626 * Update and log the header, log the leaf entries. 626 * Update and log the header, log the leaf entries.
627 */ 627 */
628 ASSERT(be16_to_cpu(leaf->hdr.stale) == from - to); 628 ASSERT(be16_to_cpu(leaf->hdr.stale) == from - to);
629 be16_add(&leaf->hdr.count, -(be16_to_cpu(leaf->hdr.stale))); 629 be16_add_cpu(&leaf->hdr.count, -(be16_to_cpu(leaf->hdr.stale)));
630 leaf->hdr.stale = 0; 630 leaf->hdr.stale = 0;
631 xfs_dir2_leaf_log_header(args->trans, bp); 631 xfs_dir2_leaf_log_header(args->trans, bp);
632 if (loglow != -1) 632 if (loglow != -1)
@@ -728,7 +728,7 @@ xfs_dir2_leaf_compact_x1(
728 /* 728 /*
729 * Adjust the leaf header values. 729 * Adjust the leaf header values.
730 */ 730 */
731 be16_add(&leaf->hdr.count, -(from - to)); 731 be16_add_cpu(&leaf->hdr.count, -(from - to));
732 leaf->hdr.stale = cpu_to_be16(1); 732 leaf->hdr.stale = cpu_to_be16(1);
733 /* 733 /*
734 * Remember the low/high stale value only in the "right" 734 * Remember the low/high stale value only in the "right"
@@ -1470,7 +1470,7 @@ xfs_dir2_leaf_removename(
1470 /* 1470 /*
1471 * We just mark the leaf entry stale by putting a null in it. 1471 * We just mark the leaf entry stale by putting a null in it.
1472 */ 1472 */
1473 be16_add(&leaf->hdr.stale, 1); 1473 be16_add_cpu(&leaf->hdr.stale, 1);
1474 xfs_dir2_leaf_log_header(tp, lbp); 1474 xfs_dir2_leaf_log_header(tp, lbp);
1475 lep->address = cpu_to_be32(XFS_DIR2_NULL_DATAPTR); 1475 lep->address = cpu_to_be32(XFS_DIR2_NULL_DATAPTR);
1476 xfs_dir2_leaf_log_ents(tp, lbp, index, index); 1476 xfs_dir2_leaf_log_ents(tp, lbp, index, index);
@@ -1531,7 +1531,7 @@ xfs_dir2_leaf_removename(
1531 */ 1531 */
1532 memmove(&bestsp[db - i], bestsp, 1532 memmove(&bestsp[db - i], bestsp,
1533 (be32_to_cpu(ltp->bestcount) - (db - i)) * sizeof(*bestsp)); 1533 (be32_to_cpu(ltp->bestcount) - (db - i)) * sizeof(*bestsp));
1534 be32_add(&ltp->bestcount, -(db - i)); 1534 be32_add_cpu(&ltp->bestcount, -(db - i));
1535 xfs_dir2_leaf_log_tail(tp, lbp); 1535 xfs_dir2_leaf_log_tail(tp, lbp);
1536 xfs_dir2_leaf_log_bests(tp, lbp, 0, be32_to_cpu(ltp->bestcount) - 1); 1536 xfs_dir2_leaf_log_bests(tp, lbp, 0, be32_to_cpu(ltp->bestcount) - 1);
1537 } else 1537 } else
@@ -1712,7 +1712,7 @@ xfs_dir2_leaf_trim_data(
1712 * Eliminate the last bests entry from the table. 1712 * Eliminate the last bests entry from the table.
1713 */ 1713 */
1714 bestsp = xfs_dir2_leaf_bests_p(ltp); 1714 bestsp = xfs_dir2_leaf_bests_p(ltp);
1715 be32_add(&ltp->bestcount, -1); 1715 be32_add_cpu(&ltp->bestcount, -1);
1716 memmove(&bestsp[1], &bestsp[0], be32_to_cpu(ltp->bestcount) * sizeof(*bestsp)); 1716 memmove(&bestsp[1], &bestsp[0], be32_to_cpu(ltp->bestcount) * sizeof(*bestsp));
1717 xfs_dir2_leaf_log_tail(tp, lbp); 1717 xfs_dir2_leaf_log_tail(tp, lbp);
1718 xfs_dir2_leaf_log_bests(tp, lbp, 0, be32_to_cpu(ltp->bestcount) - 1); 1718 xfs_dir2_leaf_log_bests(tp, lbp, 0, be32_to_cpu(ltp->bestcount) - 1);