aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_dir.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2006-06-09 00:50:37 -0400
committerNathan Scott <nathans@sgi.com>2006-06-09 00:50:37 -0400
commit1d8daf06f67c8920a640eb61b30c3176ecc52405 (patch)
treeb5ee131d524177d05d7f5cacdfd662f65246ca7c /fs/xfs/xfs_dir.c
parent8034fff39bb9430d807375ec7a04097efba42cd2 (diff)
[XFS] endianess annotations for xfs_dir_leaf_entry_t
SGI-PV: 943272 SGI-Modid: xfs-linux-melb:xfs-kern:25808a Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Nathan Scott <nathans@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_dir.c')
-rw-r--r--fs/xfs/xfs_dir.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/fs/xfs/xfs_dir.c b/fs/xfs/xfs_dir.c
index a3b0e97dbf96..3cd8657a81f6 100644
--- a/fs/xfs/xfs_dir.c
+++ b/fs/xfs/xfs_dir.c
@@ -710,7 +710,7 @@ xfs_dir_leaf_replace(xfs_da_args_t *args)
710 if (retval == EEXIST) { 710 if (retval == EEXIST) {
711 leaf = bp->data; 711 leaf = bp->data;
712 entry = &leaf->entries[index]; 712 entry = &leaf->entries[index];
713 namest = XFS_DIR_LEAF_NAMESTRUCT(leaf, INT_GET(entry->nameidx, ARCH_CONVERT)); 713 namest = XFS_DIR_LEAF_NAMESTRUCT(leaf, be16_to_cpu(entry->nameidx));
714 /* XXX - replace assert? */ 714 /* XXX - replace assert? */
715 XFS_DIR_SF_PUT_DIRINO(&inum, &namest->inumber); 715 XFS_DIR_SF_PUT_DIRINO(&inum, &namest->inumber);
716 xfs_da_log_buf(args->trans, bp, 716 xfs_da_log_buf(args->trans, bp,
@@ -918,14 +918,14 @@ xfs_dir_node_getdents(xfs_trans_t *trans, xfs_inode_t *dp, uio_t *uio,
918 xfs_da_brelse(trans, bp); 918 xfs_da_brelse(trans, bp);
919 bp = NULL; 919 bp = NULL;
920 } 920 }
921 if (bp && INT_GET(leaf->entries[0].hashval, ARCH_CONVERT) > cookhash) { 921 if (bp && be32_to_cpu(leaf->entries[0].hashval) > cookhash) {
922 xfs_dir_trace_g_dub("node: leaf hash too large", 922 xfs_dir_trace_g_dub("node: leaf hash too large",
923 dp, uio, bno); 923 dp, uio, bno);
924 xfs_da_brelse(trans, bp); 924 xfs_da_brelse(trans, bp);
925 bp = NULL; 925 bp = NULL;
926 } 926 }
927 if (bp && 927 if (bp && cookhash > be32_to_cpu(leaf->entries[
928 cookhash > INT_GET(leaf->entries[be16_to_cpu(leaf->hdr.count) - 1].hashval, ARCH_CONVERT)) { 928 be16_to_cpu(leaf->hdr.count) - 1].hashval)) {
929 xfs_dir_trace_g_dub("node: leaf hash too small", 929 xfs_dir_trace_g_dub("node: leaf hash too small",
930 dp, uio, bno); 930 dp, uio, bno);
931 xfs_da_brelse(trans, bp); 931 xfs_da_brelse(trans, bp);
@@ -1059,7 +1059,7 @@ xfs_dir_node_replace(xfs_da_args_t *args)
1059 bp = blk->bp; 1059 bp = blk->bp;
1060 leaf = bp->data; 1060 leaf = bp->data;
1061 entry = &leaf->entries[blk->index]; 1061 entry = &leaf->entries[blk->index];
1062 namest = XFS_DIR_LEAF_NAMESTRUCT(leaf, INT_GET(entry->nameidx, ARCH_CONVERT)); 1062 namest = XFS_DIR_LEAF_NAMESTRUCT(leaf, be16_to_cpu(entry->nameidx));
1063 /* XXX - replace assert ? */ 1063 /* XXX - replace assert ? */
1064 XFS_DIR_SF_PUT_DIRINO(&inum, &namest->inumber); 1064 XFS_DIR_SF_PUT_DIRINO(&inum, &namest->inumber);
1065 xfs_da_log_buf(args->trans, bp, 1065 xfs_da_log_buf(args->trans, bp,
@@ -1151,10 +1151,8 @@ xfs_dir_trace_g_dul(char *where, xfs_inode_t *dp, uio_t *uio,
1151 (void *)(unsigned long)uio->uio_resid, 1151 (void *)(unsigned long)uio->uio_resid,
1152 (void *)(unsigned long)be32_to_cpu(leaf->hdr.info.forw), 1152 (void *)(unsigned long)be32_to_cpu(leaf->hdr.info.forw),
1153 (void *)(unsigned long)be16_to_cpu(leaf->hdr.count), 1153 (void *)(unsigned long)be16_to_cpu(leaf->hdr.count),
1154 (void *)(unsigned long) 1154 (void *)(unsigned long)be32_to_cpu(leaf->entries[0].hashval),
1155 INT_GET(leaf->entries[0].hashval, ARCH_CONVERT), 1155 (void *)(unsigned long)be32_to_cpu(leaf->entries[last].hashval),
1156 (void *)(unsigned long)
1157 INT_GET(leaf->entries[last].hashval, ARCH_CONVERT),
1158 NULL, NULL, NULL); 1156 NULL, NULL, NULL);
1159} 1157}
1160 1158
@@ -1170,8 +1168,7 @@ xfs_dir_trace_g_due(char *where, xfs_inode_t *dp, uio_t *uio,
1170 (void *)((unsigned long)(uio->uio_offset >> 32)), 1168 (void *)((unsigned long)(uio->uio_offset >> 32)),
1171 (void *)((unsigned long)(uio->uio_offset & 0xFFFFFFFF)), 1169 (void *)((unsigned long)(uio->uio_offset & 0xFFFFFFFF)),
1172 (void *)(unsigned long)uio->uio_resid, 1170 (void *)(unsigned long)uio->uio_resid,
1173 (void *)(unsigned long) 1171 (void *)(unsigned long)be32_to_cpu(entry->hashval),
1174 INT_GET(entry->hashval, ARCH_CONVERT),
1175 NULL, NULL, NULL, NULL, NULL, NULL); 1172 NULL, NULL, NULL, NULL, NULL, NULL);
1176} 1173}
1177 1174