aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_dir.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_dir.c')
-rw-r--r--fs/xfs/xfs_dir.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/fs/xfs/xfs_dir.c b/fs/xfs/xfs_dir.c
index 9cc702a839a3..a3b0e97dbf96 100644
--- a/fs/xfs/xfs_dir.c
+++ b/fs/xfs/xfs_dir.c
@@ -638,8 +638,8 @@ xfs_dir_leaf_removename(xfs_da_args_t *args, int *count, int *totallen)
638 retval = xfs_dir_leaf_lookup_int(bp, args, &index); 638 retval = xfs_dir_leaf_lookup_int(bp, args, &index);
639 if (retval == EEXIST) { 639 if (retval == EEXIST) {
640 (void)xfs_dir_leaf_remove(args->trans, bp, index); 640 (void)xfs_dir_leaf_remove(args->trans, bp, index);
641 *count = INT_GET(leaf->hdr.count, ARCH_CONVERT); 641 *count = be16_to_cpu(leaf->hdr.count);
642 *totallen = INT_GET(leaf->hdr.namebytes, ARCH_CONVERT); 642 *totallen = be16_to_cpu(leaf->hdr.namebytes);
643 retval = 0; 643 retval = 0;
644 } 644 }
645 xfs_da_buf_done(bp); 645 xfs_da_buf_done(bp);
@@ -925,7 +925,7 @@ xfs_dir_node_getdents(xfs_trans_t *trans, xfs_inode_t *dp, uio_t *uio,
925 bp = NULL; 925 bp = NULL;
926 } 926 }
927 if (bp && 927 if (bp &&
928 cookhash > INT_GET(leaf->entries[INT_GET(leaf->hdr.count, ARCH_CONVERT) - 1].hashval, ARCH_CONVERT)) { 928 cookhash > INT_GET(leaf->entries[be16_to_cpu(leaf->hdr.count) - 1].hashval, ARCH_CONVERT)) {
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);
@@ -1142,7 +1142,7 @@ void
1142xfs_dir_trace_g_dul(char *where, xfs_inode_t *dp, uio_t *uio, 1142xfs_dir_trace_g_dul(char *where, xfs_inode_t *dp, uio_t *uio,
1143 xfs_dir_leafblock_t *leaf) 1143 xfs_dir_leafblock_t *leaf)
1144{ 1144{
1145 int last = INT_GET(leaf->hdr.count, ARCH_CONVERT) - 1; 1145 int last = be16_to_cpu(leaf->hdr.count) - 1;
1146 1146
1147 xfs_dir_trace_enter(XFS_DIR_KTRACE_G_DUL, where, 1147 xfs_dir_trace_enter(XFS_DIR_KTRACE_G_DUL, where,
1148 (void *)dp, (void *)dp->i_mount, 1148 (void *)dp, (void *)dp->i_mount,
@@ -1150,8 +1150,7 @@ xfs_dir_trace_g_dul(char *where, xfs_inode_t *dp, uio_t *uio,
1150 (void *)((unsigned long)(uio->uio_offset & 0xFFFFFFFF)), 1150 (void *)((unsigned long)(uio->uio_offset & 0xFFFFFFFF)),
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) 1153 (void *)(unsigned long)be16_to_cpu(leaf->hdr.count),
1154 INT_GET(leaf->hdr.count, ARCH_CONVERT),
1155 (void *)(unsigned long) 1154 (void *)(unsigned long)
1156 INT_GET(leaf->entries[0].hashval, ARCH_CONVERT), 1155 INT_GET(leaf->entries[0].hashval, ARCH_CONVERT),
1157 (void *)(unsigned long) 1156 (void *)(unsigned long)