diff options
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 52c83be4b307..a4554c007ef7 100644 --- a/fs/btrfs/root-tree.c +++ b/fs/btrfs/root-tree.c | |||
@@ -21,7 +21,7 @@ int btrfs_find_last_root(struct btrfs_root *root, u64 objectid, | |||
21 | if (ret < 0) | 21 | if (ret < 0) |
22 | goto out; | 22 | goto out; |
23 | BUG_ON(ret == 0); | 23 | BUG_ON(ret == 0); |
24 | l = &path.nodes[0]->leaf; | 24 | l = btrfs_buffer_leaf(path.nodes[0]); |
25 | BUG_ON(path.slots[0] == 0); | 25 | BUG_ON(path.slots[0] == 0); |
26 | slot = path.slots[0] - 1; | 26 | slot = path.slots[0] - 1; |
27 | if (btrfs_disk_key_objectid(&l->items[slot].key) != objectid) { | 27 | if (btrfs_disk_key_objectid(&l->items[slot].key) != objectid) { |
@@ -51,7 +51,7 @@ int btrfs_update_root(struct btrfs_trans_handle *trans, struct btrfs_root | |||
51 | if (ret < 0) | 51 | if (ret < 0) |
52 | goto out; | 52 | goto out; |
53 | BUG_ON(ret != 0); | 53 | BUG_ON(ret != 0); |
54 | l = &path.nodes[0]->leaf; | 54 | l = btrfs_buffer_leaf(path.nodes[0]); |
55 | slot = path.slots[0]; | 55 | slot = path.slots[0]; |
56 | memcpy(btrfs_item_ptr(l, slot, struct btrfs_root_item), item, | 56 | memcpy(btrfs_item_ptr(l, slot, struct btrfs_root_item), item, |
57 | sizeof(*item)); | 57 | sizeof(*item)); |