aboutsummaryrefslogtreecommitdiffstats
path: root/random-test.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2007-03-12 20:12:07 -0400
committerDavid Woodhouse <dwmw2@hera.kernel.org>2007-03-12 20:12:07 -0400
commitf6a88938c6ccc1c3d7398764bcbc4e08c2cb6738 (patch)
treec4c15b57ae92efd459c793d7f345918e8023a4b1 /random-test.c
parentb2e2afd7b4f10536f10771bd6ba2b0a98357d481 (diff)
downloadbtrfs-progs-f6a88938c6ccc1c3d7398764bcbc4e08c2cb6738.tar.gz
btrfs-progs-f6a88938c6ccc1c3d7398764bcbc4e08c2cb6738.tar.xz
btrfs-progs-f6a88938c6ccc1c3d7398764bcbc4e08c2cb6738.zip
struct item endian fixes
Diffstat (limited to 'random-test.c')
-rw-r--r--random-test.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/random-test.c b/random-test.c
index 34a1584..e767528 100644
--- a/random-test.c
+++ b/random-test.c
@@ -173,7 +173,7 @@ static int empty_tree(struct ctree_root *root, struct radix_tree_root *radix,
path.slots[0] -= 1;
}
slot = path.slots[0];
- found = path.nodes[0]->leaf.items[slot].key.objectid;
+ found=btrfs_key_objectid(&path.nodes[0]->leaf.items[slot].key);
ret = del_item(root, &path);
count++;
if (ret) {
@@ -274,7 +274,8 @@ static int fill_radix(struct ctree_root *root, struct radix_tree_root *radix)
slot -= 1;
}
for (i = slot; i >= 0; i--) {
- found = path.nodes[0]->leaf.items[i].key.objectid;
+ found = btrfs_key_objectid(&path.nodes[0]->
+ leaf.items[i].key);
radix_tree_preload(GFP_KERNEL);
ret = radix_tree_insert(radix, found, (void *)found);
if (ret) {