]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[XFS] endianess annotations for xfs_attr_leaf_name_remote_t
authorNathan Scott <nathans@sgi.com>
Fri, 17 Mar 2006 06:29:18 +0000 (17:29 +1100)
committerNathan Scott <nathans@sgi.com>
Fri, 17 Mar 2006 06:29:18 +0000 (17:29 +1100)
SGI-PV: 943272
SGI-Modid: xfs-linux-melb:xfs-kern:25500a

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nathan Scott <nathans@sgi.com>
fs/xfs/xfs_attr_leaf.c
fs/xfs/xfs_attr_leaf.h

index 3adfc5dcfe7d5a4a1aec09879883ec4ad50b88bb..531417b2c74c7b178e9d1910678aac7d543e18ad 100644 (file)
@@ -2006,11 +2006,9 @@ xfs_attr_leaf_lookup_int(xfs_dabuf_t *bp, xfs_da_args_t *args)
                            ((entry->flags & XFS_ATTR_ROOT) != 0))
                                continue;
                        args->index = probe;
-                       args->rmtblkno
-                                 = INT_GET(name_rmt->valueblk, ARCH_CONVERT);
+                       args->rmtblkno = be32_to_cpu(name_rmt->valueblk);
                        args->rmtblkcnt = XFS_B_TO_FSB(args->dp->i_mount,
-                                                  INT_GET(name_rmt->valuelen,
-                                                               ARCH_CONVERT));
+                                                  be32_to_cpu(name_rmt->valuelen));
                        return(XFS_ERROR(EEXIST));
                }
        }
@@ -2057,8 +2055,8 @@ xfs_attr_leaf_getvalue(xfs_dabuf_t *bp, xfs_da_args_t *args)
                name_rmt = XFS_ATTR_LEAF_NAME_REMOTE(leaf, args->index);
                ASSERT(name_rmt->namelen == args->namelen);
                ASSERT(memcmp(args->name, name_rmt->name, args->namelen) == 0);
-               valuelen = INT_GET(name_rmt->valuelen, ARCH_CONVERT);
-               args->rmtblkno = INT_GET(name_rmt->valueblk, ARCH_CONVERT);
+               valuelen = be32_to_cpu(name_rmt->valuelen);
+               args->rmtblkno = be32_to_cpu(name_rmt->valueblk);
                args->rmtblkcnt = XFS_B_TO_FSB(args->dp->i_mount, valuelen);
                if (args->flags & ATTR_KERNOVAL) {
                        args->valuelen = valuelen;
@@ -2413,8 +2411,7 @@ xfs_attr_leaf_list_int(xfs_dabuf_t *bp, xfs_attr_list_context_t *context)
                                retval = xfs_attr_put_listent(context, namesp,
                                        (char *)name_rmt->name,
                                        (int)name_rmt->namelen,
-                                       (int)INT_GET(name_rmt->valuelen,
-                                                               ARCH_CONVERT));
+                                       be32_to_cpu(name_rmt->valuelen));
                        }
                }
                if (retval == 0) {
@@ -2549,8 +2546,8 @@ xfs_attr_leaf_clearflag(xfs_da_args_t *args)
        if (args->rmtblkno) {
                ASSERT((entry->flags & XFS_ATTR_LOCAL) == 0);
                name_rmt = XFS_ATTR_LEAF_NAME_REMOTE(leaf, args->index);
-               INT_SET(name_rmt->valueblk, ARCH_CONVERT, args->rmtblkno);
-               INT_SET(name_rmt->valuelen, ARCH_CONVERT, args->valuelen);
+               name_rmt->valueblk = cpu_to_be32(args->rmtblkno);
+               name_rmt->valuelen = cpu_to_be32(args->valuelen);
                xfs_da_log_buf(args->trans, bp,
                         XFS_DA_LOGRANGE(leaf, name_rmt, sizeof(*name_rmt)));
        }
@@ -2703,8 +2700,8 @@ xfs_attr_leaf_flipflags(xfs_da_args_t *args)
        if (args->rmtblkno) {
                ASSERT((entry1->flags & XFS_ATTR_LOCAL) == 0);
                name_rmt = XFS_ATTR_LEAF_NAME_REMOTE(leaf1, args->index);
-               INT_SET(name_rmt->valueblk, ARCH_CONVERT, args->rmtblkno);
-               INT_SET(name_rmt->valuelen, ARCH_CONVERT, args->valuelen);
+               name_rmt->valueblk = cpu_to_be32(args->rmtblkno);
+               name_rmt->valuelen = cpu_to_be32(args->valuelen);
                xfs_da_log_buf(args->trans, bp1,
                         XFS_DA_LOGRANGE(leaf1, name_rmt, sizeof(*name_rmt)));
        }
@@ -2953,8 +2950,7 @@ xfs_attr_leaf_inactive(xfs_trans_t **trans, xfs_inode_t *dp, xfs_dabuf_t *bp)
                                lp->valueblk = name_rmt->valueblk;
                                INT_SET(lp->valuelen, ARCH_CONVERT,
                                                XFS_B_TO_FSB(dp->i_mount,
-                                                   INT_GET(name_rmt->valuelen,
-                                                             ARCH_CONVERT)));
+                                                   be32_to_cpu(name_rmt->valuelen)));
                                lp++;
                        }
                }
index ad6f791ec58a20932269eba15a8a878c2d3dfc21..51c3ee156b2fdf787399710ce5b280007ff0655c 100644 (file)
@@ -102,10 +102,10 @@ typedef struct xfs_attr_leaf_name_local {
 } xfs_attr_leaf_name_local_t;
 
 typedef struct xfs_attr_leaf_name_remote {
-       xfs_dablk_t     valueblk;       /* block number of value bytes */
-       __uint32_t      valuelen;       /* number of bytes in value */
-       __uint8_t       namelen;        /* length of name bytes */
-       __uint8_t       name[1];        /* name bytes */
+       __be32  valueblk;               /* block number of value bytes */
+       __be32  valuelen;               /* number of bytes in value */
+       __u8    namelen;                /* length of name bytes */
+       __u8    name[1];                /* name bytes */
 } xfs_attr_leaf_name_remote_t;
 
 typedef struct xfs_attr_leafblock {