[XFS] endianess annotations for xfs_da_blkinfo_t
[pandora-kernel.git] / fs / xfs / xfs_dir.c
index 3dd3039..7a708e9 100644 (file)
@@ -176,7 +176,7 @@ xfs_dir_mount(xfs_mount_t *mp)
        uint shortcount, leafcount, count;
 
        mp->m_dirversion = 1;
-       if (mp->m_flags & XFS_MOUNT_COMPAT_ATTR) {
+       if (!(mp->m_flags & XFS_MOUNT_ATTR2)) {
                shortcount = (mp->m_attroffset -
                                (uint)sizeof(xfs_dir_sf_hdr_t)) /
                                 (uint)sizeof(xfs_dir_sf_entry_t);
@@ -634,7 +634,7 @@ xfs_dir_leaf_removename(xfs_da_args_t *args, int *count, int *totallen)
                return(retval);
        ASSERT(bp != NULL);
        leaf = bp->data;
-       ASSERT(INT_GET(leaf->hdr.info.magic, ARCH_CONVERT) == XFS_DIR_LEAF_MAGIC);
+       ASSERT(be16_to_cpu(leaf->hdr.info.magic) == XFS_DIR_LEAF_MAGIC);
        retval = xfs_dir_leaf_lookup_int(bp, args, &index);
        if (retval == EEXIST) {
                (void)xfs_dir_leaf_remove(args->trans, bp, index);
@@ -912,7 +912,7 @@ xfs_dir_node_getdents(xfs_trans_t *trans, xfs_inode_t *dp, uio_t *uio,
                        return(error);
                if (bp)
                        leaf = bp->data;
-               if (bp && INT_GET(leaf->hdr.info.magic, ARCH_CONVERT) != XFS_DIR_LEAF_MAGIC) {
+               if (bp && be16_to_cpu(leaf->hdr.info.magic) != XFS_DIR_LEAF_MAGIC) {
                        xfs_dir_trace_g_dub("node: block not a leaf",
                                                   dp, uio, bno);
                        xfs_da_brelse(trans, bp);
@@ -949,7 +949,7 @@ xfs_dir_node_getdents(xfs_trans_t *trans, xfs_inode_t *dp, uio_t *uio,
                        if (bp == NULL)
                                return(XFS_ERROR(EFSCORRUPTED));
                        node = bp->data;
-                       if (INT_GET(node->hdr.info.magic, ARCH_CONVERT) != XFS_DA_NODE_MAGIC)
+                       if (be16_to_cpu(node->hdr.info.magic) != XFS_DA_NODE_MAGIC)
                                break;
                        btree = &node->btree[0];
                        xfs_dir_trace_g_dun("node: node detail", dp, uio, node);
@@ -982,7 +982,7 @@ xfs_dir_node_getdents(xfs_trans_t *trans, xfs_inode_t *dp, uio_t *uio,
         */
        for (;;) {
                leaf = bp->data;
-               if (unlikely(INT_GET(leaf->hdr.info.magic, ARCH_CONVERT) != XFS_DIR_LEAF_MAGIC)) {
+               if (unlikely(be16_to_cpu(leaf->hdr.info.magic) != XFS_DIR_LEAF_MAGIC)) {
                        xfs_dir_trace_g_dul("node: not a leaf", dp, uio, leaf);
                        xfs_da_brelse(trans, bp);
                        XFS_CORRUPTION_ERROR("xfs_dir_node_getdents(1)",
@@ -990,7 +990,7 @@ xfs_dir_node_getdents(xfs_trans_t *trans, xfs_inode_t *dp, uio_t *uio,
                        return XFS_ERROR(EFSCORRUPTED);
                }
                xfs_dir_trace_g_dul("node: leaf detail", dp, uio, leaf);
-               if ((nextbno = INT_GET(leaf->hdr.info.forw, ARCH_CONVERT))) {
+               if ((nextbno = be32_to_cpu(leaf->hdr.info.forw))) {
                        nextda = xfs_da_reada_buf(trans, dp, nextbno,
                                                  XFS_DATA_FORK);
                } else
@@ -1125,8 +1125,7 @@ xfs_dir_trace_g_dun(char *where, xfs_inode_t *dp, uio_t *uio,
                     (void *)((unsigned long)(uio->uio_offset >> 32)),
                     (void *)((unsigned long)(uio->uio_offset & 0xFFFFFFFF)),
                     (void *)(unsigned long)uio->uio_resid,
-                    (void *)(unsigned long)
-                       INT_GET(node->hdr.info.forw, ARCH_CONVERT),
+                    (void *)(unsigned long)be32_to_cpu(node->hdr.info.forw),
                     (void *)(unsigned long)
                        INT_GET(node->hdr.count, ARCH_CONVERT),
                     (void *)(unsigned long)
@@ -1150,8 +1149,7 @@ xfs_dir_trace_g_dul(char *where, xfs_inode_t *dp, uio_t *uio,
                     (void *)((unsigned long)(uio->uio_offset >> 32)),
                     (void *)((unsigned long)(uio->uio_offset & 0xFFFFFFFF)),
                     (void *)(unsigned long)uio->uio_resid,
-                    (void *)(unsigned long)
-                       INT_GET(leaf->hdr.info.forw, ARCH_CONVERT),
+                    (void *)(unsigned long)be32_to_cpu(leaf->hdr.info.forw),
                     (void *)(unsigned long)
                        INT_GET(leaf->hdr.count, ARCH_CONVERT),
                     (void *)(unsigned long)