diff options
author | Chris Mason <chris.mason@oracle.com> | 2007-03-14 19:14:43 +0100 |
---|---|---|
committer | David Woodhouse <dwmw2@hera.kernel.org> | 2007-03-14 19:14:43 +0100 |
commit | 123abc88c9087b9c5605566ee3491aaef17fd837 (patch) | |
tree | 3a8e83ac7a095d2b875664ee54cf7e24e977999b /fs/btrfs/root-tree.c | |
parent | Btrfs: add leaf data casting helper (diff) | |
download | linux-123abc88c9087b9c5605566ee3491aaef17fd837.tar.xz 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.c | 4 |
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); |