summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/root-tree.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2007-03-14 14:14:43 -0400
committerDavid Woodhouse <dwmw2@hera.kernel.org>2007-03-14 14:14:43 -0400
commit123abc88c9087b9c5605566ee3491aaef17fd837 (patch)
tree3a8e83ac7a095d2b875664ee54cf7e24e977999b /fs/btrfs/root-tree.c
parent4beb1b8b75a86373f6020103ab840448d14c8880 (diff)
downloadblackbird-op-linux-123abc88c9087b9c5605566ee3491aaef17fd837.tar.gz
blackbird-op-linux-123abc88c9087b9c5605566ee3491aaef17fd837.zip
Btrfs: variable block size support
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/root-tree.c')
-rw-r--r--fs/btrfs/root-tree.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/root-tree.c b/fs/btrfs/root-tree.c
index 0ab90cfea98f..03aa7c2c6336 100644
--- a/fs/btrfs/root-tree.c
+++ b/fs/btrfs/root-tree.c
@@ -31,7 +31,7 @@ int btrfs_find_last_root(struct btrfs_root *root, u64 objectid,
ret = 1;
goto out;
}
- memcpy(item, l->data + btrfs_item_offset(l->items + slot),
+ memcpy(item, btrfs_item_ptr(l, slot, struct btrfs_root_item),
sizeof(*item));
btrfs_disk_key_to_cpu(key, &l->items[slot].key);
btrfs_release_path(root, &path);
@@ -55,7 +55,7 @@ int btrfs_update_root(struct btrfs_root *root, struct btrfs_key *key,
BUG_ON(ret != 0);
l = &path.nodes[0]->leaf;
slot = path.slots[0];
- memcpy(l->data + btrfs_item_offset(l->items + slot), item,
+ memcpy(btrfs_item_ptr(l, slot, struct btrfs_root_item), item,
sizeof(*item));
out:
btrfs_release_path(root, &path);
OpenPOWER on IntegriCloud