Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 28409
b: refs/heads/master
c: 1d8daf0
h: refs/heads/master
i:
  28407: f5aa133
v: v3
  • Loading branch information
Christoph Hellwig authored and Nathan Scott committed Jun 9, 2006
1 parent 6c3e59b commit 6877006
Show file tree
Hide file tree
Showing 5 changed files with 81 additions and 79 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8034fff39bb9430d807375ec7a04097efba42cd2
refs/heads/master: 1d8daf06f67c8920a640eb61b30c3176ecc52405
4 changes: 2 additions & 2 deletions trunk/fs/xfs/xfs_da_btree.c
Original file line number Diff line number Diff line change
Expand Up @@ -1785,8 +1785,8 @@ xfs_da_swap_lastblock(xfs_da_args_t *args, xfs_dablk_t *dead_blknop,
ASSERT(XFS_DIR_IS_V1(mp));
dead_leaf = (xfs_dir_leafblock_t *)dead_info;
dead_level = 0;
dead_hash =
INT_GET(dead_leaf->entries[be16_to_cpu(dead_leaf->hdr.count) - 1].hashval, ARCH_CONVERT);
dead_hash = be32_to_cpu(dead_leaf->entries[
be16_to_cpu(dead_leaf->hdr.count) - 1].hashval);
} else if (be16_to_cpu(dead_info->magic) == XFS_DIR2_LEAFN_MAGIC) {
ASSERT(XFS_DIR_IS_V2(mp));
dead_leaf2 = (xfs_dir2_leaf_t *)dead_info;
Expand Down
19 changes: 8 additions & 11 deletions trunk/fs/xfs/xfs_dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,7 @@ xfs_dir_leaf_replace(xfs_da_args_t *args)
if (retval == EEXIST) {
leaf = bp->data;
entry = &leaf->entries[index];
namest = XFS_DIR_LEAF_NAMESTRUCT(leaf, INT_GET(entry->nameidx, ARCH_CONVERT));
namest = XFS_DIR_LEAF_NAMESTRUCT(leaf, be16_to_cpu(entry->nameidx));
/* XXX - replace assert? */
XFS_DIR_SF_PUT_DIRINO(&inum, &namest->inumber);
xfs_da_log_buf(args->trans, bp,
Expand Down Expand Up @@ -918,14 +918,14 @@ xfs_dir_node_getdents(xfs_trans_t *trans, xfs_inode_t *dp, uio_t *uio,
xfs_da_brelse(trans, bp);
bp = NULL;
}
if (bp && INT_GET(leaf->entries[0].hashval, ARCH_CONVERT) > cookhash) {
if (bp && be32_to_cpu(leaf->entries[0].hashval) > cookhash) {
xfs_dir_trace_g_dub("node: leaf hash too large",
dp, uio, bno);
xfs_da_brelse(trans, bp);
bp = NULL;
}
if (bp &&
cookhash > INT_GET(leaf->entries[be16_to_cpu(leaf->hdr.count) - 1].hashval, ARCH_CONVERT)) {
if (bp && cookhash > be32_to_cpu(leaf->entries[
be16_to_cpu(leaf->hdr.count) - 1].hashval)) {
xfs_dir_trace_g_dub("node: leaf hash too small",
dp, uio, bno);
xfs_da_brelse(trans, bp);
Expand Down Expand Up @@ -1059,7 +1059,7 @@ xfs_dir_node_replace(xfs_da_args_t *args)
bp = blk->bp;
leaf = bp->data;
entry = &leaf->entries[blk->index];
namest = XFS_DIR_LEAF_NAMESTRUCT(leaf, INT_GET(entry->nameidx, ARCH_CONVERT));
namest = XFS_DIR_LEAF_NAMESTRUCT(leaf, be16_to_cpu(entry->nameidx));
/* XXX - replace assert ? */
XFS_DIR_SF_PUT_DIRINO(&inum, &namest->inumber);
xfs_da_log_buf(args->trans, bp,
Expand Down Expand Up @@ -1151,10 +1151,8 @@ xfs_dir_trace_g_dul(char *where, xfs_inode_t *dp, uio_t *uio,
(void *)(unsigned long)uio->uio_resid,
(void *)(unsigned long)be32_to_cpu(leaf->hdr.info.forw),
(void *)(unsigned long)be16_to_cpu(leaf->hdr.count),
(void *)(unsigned long)
INT_GET(leaf->entries[0].hashval, ARCH_CONVERT),
(void *)(unsigned long)
INT_GET(leaf->entries[last].hashval, ARCH_CONVERT),
(void *)(unsigned long)be32_to_cpu(leaf->entries[0].hashval),
(void *)(unsigned long)be32_to_cpu(leaf->entries[last].hashval),
NULL, NULL, NULL);
}

Expand All @@ -1170,8 +1168,7 @@ xfs_dir_trace_g_due(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(entry->hashval, ARCH_CONVERT),
(void *)(unsigned long)be32_to_cpu(entry->hashval),
NULL, NULL, NULL, NULL, NULL, NULL);
}

Expand Down
Loading

0 comments on commit 6877006

Please sign in to comment.