diff options
author | Nathan Scott <nathans@sgi.com> | 2006-03-17 01:28:40 -0500 |
---|---|---|
committer | Nathan Scott <nathans@sgi.com> | 2006-03-17 01:28:40 -0500 |
commit | 89da054424a775b4b257556eda8a300be1134d7c (patch) | |
tree | b7a6d19ee5baaebf2794271dabaf0f59d44f9fa6 /fs/xfs/xfs_attr.c | |
parent | 3d693c6ed7892d066e8fb3311c6b74f7699326f9 (diff) |
[XFS] endianess annotations for xfs_da_blkinfo_t
SGI-PV: 943272
SGI-Modid: xfs-linux-melb:xfs-kern:25495a
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nathan Scott <nathans@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_attr.c')
-rw-r--r-- | fs/xfs/xfs_attr.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/fs/xfs/xfs_attr.c b/fs/xfs/xfs_attr.c index acf1b7c9f1db..36b120d859af 100644 --- a/fs/xfs/xfs_attr.c +++ b/fs/xfs/xfs_attr.c | |||
@@ -1127,8 +1127,7 @@ xfs_attr_leaf_list(xfs_attr_list_context_t *context) | |||
1127 | return(error); | 1127 | return(error); |
1128 | ASSERT(bp != NULL); | 1128 | ASSERT(bp != NULL); |
1129 | leaf = bp->data; | 1129 | leaf = bp->data; |
1130 | if (unlikely(INT_GET(leaf->hdr.info.magic, ARCH_CONVERT) | 1130 | if (unlikely(be16_to_cpu(leaf->hdr.info.magic) != XFS_ATTR_LEAF_MAGIC)) { |
1131 | != XFS_ATTR_LEAF_MAGIC)) { | ||
1132 | XFS_CORRUPTION_ERROR("xfs_attr_leaf_list", XFS_ERRLEVEL_LOW, | 1131 | XFS_CORRUPTION_ERROR("xfs_attr_leaf_list", XFS_ERRLEVEL_LOW, |
1133 | context->dp->i_mount, leaf); | 1132 | context->dp->i_mount, leaf); |
1134 | xfs_da_brelse(NULL, bp); | 1133 | xfs_da_brelse(NULL, bp); |
@@ -1541,8 +1540,8 @@ xfs_attr_node_removename(xfs_da_args_t *args) | |||
1541 | XFS_ATTR_FORK); | 1540 | XFS_ATTR_FORK); |
1542 | if (error) | 1541 | if (error) |
1543 | goto out; | 1542 | goto out; |
1544 | ASSERT(INT_GET(((xfs_attr_leafblock_t *) | 1543 | ASSERT(be16_to_cpu(((xfs_attr_leafblock_t *) |
1545 | bp->data)->hdr.info.magic, ARCH_CONVERT) | 1544 | bp->data)->hdr.info.magic) |
1546 | == XFS_ATTR_LEAF_MAGIC); | 1545 | == XFS_ATTR_LEAF_MAGIC); |
1547 | 1546 | ||
1548 | if ((forkoff = xfs_attr_shortform_allfit(bp, dp))) { | 1547 | if ((forkoff = xfs_attr_shortform_allfit(bp, dp))) { |
@@ -1763,7 +1762,7 @@ xfs_attr_node_list(xfs_attr_list_context_t *context) | |||
1763 | return(error); | 1762 | return(error); |
1764 | if (bp) { | 1763 | if (bp) { |
1765 | node = bp->data; | 1764 | node = bp->data; |
1766 | switch (INT_GET(node->hdr.info.magic, ARCH_CONVERT)) { | 1765 | switch (be16_to_cpu(node->hdr.info.magic)) { |
1767 | case XFS_DA_NODE_MAGIC: | 1766 | case XFS_DA_NODE_MAGIC: |
1768 | xfs_attr_trace_l_cn("wrong blk", context, node); | 1767 | xfs_attr_trace_l_cn("wrong blk", context, node); |
1769 | xfs_da_brelse(NULL, bp); | 1768 | xfs_da_brelse(NULL, bp); |
@@ -1817,10 +1816,10 @@ xfs_attr_node_list(xfs_attr_list_context_t *context) | |||
1817 | return(XFS_ERROR(EFSCORRUPTED)); | 1816 | return(XFS_ERROR(EFSCORRUPTED)); |
1818 | } | 1817 | } |
1819 | node = bp->data; | 1818 | node = bp->data; |
1820 | if (INT_GET(node->hdr.info.magic, ARCH_CONVERT) | 1819 | if (be16_to_cpu(node->hdr.info.magic) |
1821 | == XFS_ATTR_LEAF_MAGIC) | 1820 | == XFS_ATTR_LEAF_MAGIC) |
1822 | break; | 1821 | break; |
1823 | if (unlikely(INT_GET(node->hdr.info.magic, ARCH_CONVERT) | 1822 | if (unlikely(be16_to_cpu(node->hdr.info.magic) |
1824 | != XFS_DA_NODE_MAGIC)) { | 1823 | != XFS_DA_NODE_MAGIC)) { |
1825 | XFS_CORRUPTION_ERROR("xfs_attr_node_list(3)", | 1824 | XFS_CORRUPTION_ERROR("xfs_attr_node_list(3)", |
1826 | XFS_ERRLEVEL_LOW, | 1825 | XFS_ERRLEVEL_LOW, |
@@ -1858,7 +1857,7 @@ xfs_attr_node_list(xfs_attr_list_context_t *context) | |||
1858 | */ | 1857 | */ |
1859 | for (;;) { | 1858 | for (;;) { |
1860 | leaf = bp->data; | 1859 | leaf = bp->data; |
1861 | if (unlikely(INT_GET(leaf->hdr.info.magic, ARCH_CONVERT) | 1860 | if (unlikely(be16_to_cpu(leaf->hdr.info.magic) |
1862 | != XFS_ATTR_LEAF_MAGIC)) { | 1861 | != XFS_ATTR_LEAF_MAGIC)) { |
1863 | XFS_CORRUPTION_ERROR("xfs_attr_node_list(4)", | 1862 | XFS_CORRUPTION_ERROR("xfs_attr_node_list(4)", |
1864 | XFS_ERRLEVEL_LOW, | 1863 | XFS_ERRLEVEL_LOW, |
@@ -1869,7 +1868,7 @@ xfs_attr_node_list(xfs_attr_list_context_t *context) | |||
1869 | error = xfs_attr_leaf_list_int(bp, context); | 1868 | error = xfs_attr_leaf_list_int(bp, context); |
1870 | if (error || !leaf->hdr.info.forw) | 1869 | if (error || !leaf->hdr.info.forw) |
1871 | break; /* not really an error, buffer full or EOF */ | 1870 | break; /* not really an error, buffer full or EOF */ |
1872 | cursor->blkno = INT_GET(leaf->hdr.info.forw, ARCH_CONVERT); | 1871 | cursor->blkno = be32_to_cpu(leaf->hdr.info.forw); |
1873 | xfs_da_brelse(NULL, bp); | 1872 | xfs_da_brelse(NULL, bp); |
1874 | error = xfs_da_read_buf(NULL, context->dp, cursor->blkno, -1, | 1873 | error = xfs_da_read_buf(NULL, context->dp, cursor->blkno, -1, |
1875 | &bp, XFS_ATTR_FORK); | 1874 | &bp, XFS_ATTR_FORK); |