diff options
author | Nathan Scott <nathans@sgi.com> | 2006-03-17 01:26:52 -0500 |
---|---|---|
committer | Nathan Scott <nathans@sgi.com> | 2006-03-17 01:26:52 -0500 |
commit | 70e73f59755867383edf563d5a5cbea614c0fd49 (patch) | |
tree | 6850f22b47754078b1695aad1ade7bf9705dc52a /fs/xfs/xfs_dir2_node.c | |
parent | 9cea236492ebabb9545564eb039aa0f477a05c96 (diff) |
[XFS] endianess annotations for xfs_dir2_data_hdr structure.
SGI-PV: 943272
SGI-Modid: xfs-linux-melb:xfs-kern:25484a
Signed-off-by: Nathan Scott <nathans@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_dir2_node.c')
-rw-r--r-- | fs/xfs/xfs_dir2_node.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/fs/xfs/xfs_dir2_node.c b/fs/xfs/xfs_dir2_node.c index 641f8633d25..e47bde74eec 100644 --- a/fs/xfs/xfs_dir2_node.c +++ b/fs/xfs/xfs_dir2_node.c | |||
@@ -894,7 +894,7 @@ xfs_dir2_leafn_remove( | |||
894 | dbp = dblk->bp; | 894 | dbp = dblk->bp; |
895 | data = dbp->data; | 895 | data = dbp->data; |
896 | dep = (xfs_dir2_data_entry_t *)((char *)data + off); | 896 | dep = (xfs_dir2_data_entry_t *)((char *)data + off); |
897 | longest = INT_GET(data->hdr.bestfree[0].length, ARCH_CONVERT); | 897 | longest = be16_to_cpu(data->hdr.bestfree[0].length); |
898 | needlog = needscan = 0; | 898 | needlog = needscan = 0; |
899 | xfs_dir2_data_make_free(tp, dbp, off, | 899 | xfs_dir2_data_make_free(tp, dbp, off, |
900 | XFS_DIR2_DATA_ENTSIZE(dep->namelen), &needlog, &needscan); | 900 | XFS_DIR2_DATA_ENTSIZE(dep->namelen), &needlog, &needscan); |
@@ -911,7 +911,7 @@ xfs_dir2_leafn_remove( | |||
911 | * If the longest data block freespace changes, need to update | 911 | * If the longest data block freespace changes, need to update |
912 | * the corresponding freeblock entry. | 912 | * the corresponding freeblock entry. |
913 | */ | 913 | */ |
914 | if (longest < INT_GET(data->hdr.bestfree[0].length, ARCH_CONVERT)) { | 914 | if (longest < be16_to_cpu(data->hdr.bestfree[0].length)) { |
915 | int error; /* error return value */ | 915 | int error; /* error return value */ |
916 | xfs_dabuf_t *fbp; /* freeblock buffer */ | 916 | xfs_dabuf_t *fbp; /* freeblock buffer */ |
917 | xfs_dir2_db_t fdb; /* freeblock block number */ | 917 | xfs_dir2_db_t fdb; /* freeblock block number */ |
@@ -937,7 +937,7 @@ xfs_dir2_leafn_remove( | |||
937 | * Calculate which entry we need to fix. | 937 | * Calculate which entry we need to fix. |
938 | */ | 938 | */ |
939 | findex = XFS_DIR2_DB_TO_FDINDEX(mp, db); | 939 | findex = XFS_DIR2_DB_TO_FDINDEX(mp, db); |
940 | longest = INT_GET(data->hdr.bestfree[0].length, ARCH_CONVERT); | 940 | longest = be16_to_cpu(data->hdr.bestfree[0].length); |
941 | /* | 941 | /* |
942 | * If the data block is now empty we can get rid of it | 942 | * If the data block is now empty we can get rid of it |
943 | * (usually). | 943 | * (usually). |
@@ -1649,7 +1649,7 @@ xfs_dir2_node_addname_int( | |||
1649 | * change again. | 1649 | * change again. |
1650 | */ | 1650 | */ |
1651 | data = dbp->data; | 1651 | data = dbp->data; |
1652 | INT_COPY(free->bests[findex], data->hdr.bestfree[0].length, ARCH_CONVERT); | 1652 | free->bests[findex] = data->hdr.bestfree[0].length; |
1653 | logfree = 1; | 1653 | logfree = 1; |
1654 | } | 1654 | } |
1655 | /* | 1655 | /* |
@@ -1677,12 +1677,12 @@ xfs_dir2_node_addname_int( | |||
1677 | data = dbp->data; | 1677 | data = dbp->data; |
1678 | logfree = 0; | 1678 | logfree = 0; |
1679 | } | 1679 | } |
1680 | ASSERT(INT_GET(data->hdr.bestfree[0].length, ARCH_CONVERT) >= length); | 1680 | ASSERT(be16_to_cpu(data->hdr.bestfree[0].length) >= length); |
1681 | /* | 1681 | /* |
1682 | * Point to the existing unused space. | 1682 | * Point to the existing unused space. |
1683 | */ | 1683 | */ |
1684 | dup = (xfs_dir2_data_unused_t *) | 1684 | dup = (xfs_dir2_data_unused_t *) |
1685 | ((char *)data + INT_GET(data->hdr.bestfree[0].offset, ARCH_CONVERT)); | 1685 | ((char *)data + be16_to_cpu(data->hdr.bestfree[0].offset)); |
1686 | needscan = needlog = 0; | 1686 | needscan = needlog = 0; |
1687 | /* | 1687 | /* |
1688 | * Mark the first part of the unused space, inuse for us. | 1688 | * Mark the first part of the unused space, inuse for us. |
@@ -1713,8 +1713,8 @@ xfs_dir2_node_addname_int( | |||
1713 | /* | 1713 | /* |
1714 | * If the freespace entry is now wrong, update it. | 1714 | * If the freespace entry is now wrong, update it. |
1715 | */ | 1715 | */ |
1716 | if (INT_GET(free->bests[findex], ARCH_CONVERT) != INT_GET(data->hdr.bestfree[0].length, ARCH_CONVERT)) { | 1716 | if (INT_GET(free->bests[findex], ARCH_CONVERT) != be16_to_cpu(data->hdr.bestfree[0].length)) { |
1717 | INT_COPY(free->bests[findex], data->hdr.bestfree[0].length, ARCH_CONVERT); | 1717 | free->bests[findex] = data->hdr.bestfree[0].length; |
1718 | logfree = 1; | 1718 | logfree = 1; |
1719 | } | 1719 | } |
1720 | /* | 1720 | /* |
@@ -1900,7 +1900,7 @@ xfs_dir2_node_replace( | |||
1900 | * Point to the data entry. | 1900 | * Point to the data entry. |
1901 | */ | 1901 | */ |
1902 | data = state->extrablk.bp->data; | 1902 | data = state->extrablk.bp->data; |
1903 | ASSERT(INT_GET(data->hdr.magic, ARCH_CONVERT) == XFS_DIR2_DATA_MAGIC); | 1903 | ASSERT(be32_to_cpu(data->hdr.magic) == XFS_DIR2_DATA_MAGIC); |
1904 | dep = (xfs_dir2_data_entry_t *) | 1904 | dep = (xfs_dir2_data_entry_t *) |
1905 | ((char *)data + | 1905 | ((char *)data + |
1906 | XFS_DIR2_DATAPTR_TO_OFF(state->mp, INT_GET(lep->address, ARCH_CONVERT))); | 1906 | XFS_DIR2_DATAPTR_TO_OFF(state->mp, INT_GET(lep->address, ARCH_CONVERT))); |