aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/root-tree.c
diff options
context:
space:
mode:
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,
31 ret = 1; 31 ret = 1;
32 goto out; 32 goto out;
33 } 33 }
34 memcpy(item, l->data + btrfs_item_offset(l->items + slot), 34 memcpy(item, btrfs_item_ptr(l, slot, struct btrfs_root_item),
35 sizeof(*item)); 35 sizeof(*item));
36 btrfs_disk_key_to_cpu(key, &l->items[slot].key); 36 btrfs_disk_key_to_cpu(key, &l->items[slot].key);
37 btrfs_release_path(root, &path); 37 btrfs_release_path(root, &path);
@@ -55,7 +55,7 @@ int btrfs_update_root(struct btrfs_root *root, struct btrfs_key *key,
55 BUG_ON(ret != 0); 55 BUG_ON(ret != 0);
56 l = &path.nodes[0]->leaf; 56 l = &path.nodes[0]->leaf;
57 slot = path.slots[0]; 57 slot = path.slots[0];
58 memcpy(l->data + btrfs_item_offset(l->items + slot), item, 58 memcpy(btrfs_item_ptr(l, slot, struct btrfs_root_item), item,
59 sizeof(*item)); 59 sizeof(*item));
60out: 60out:
61 btrfs_release_path(root, &path); 61 btrfs_release_path(root, &path);