summaryrefslogtreecommitdiff
path: root/fs/btrfs/relocation.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/relocation.c')
-rw-r--r--fs/btrfs/relocation.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c
index fdcecce85f91..085b2b616569 100644
--- a/fs/btrfs/relocation.c
+++ b/fs/btrfs/relocation.c
@@ -1109,8 +1109,8 @@ int replace_file_extents(struct btrfs_trans_handle *trans,
ref.len = num_bytes;
ref.parent = parent;
ref.owning_root = root->root_key.objectid;
- btrfs_init_data_ref(&ref, btrfs_header_owner(leaf),
- key.objectid, key.offset,
+ ref.ref_root = btrfs_header_owner(leaf);
+ btrfs_init_data_ref(&ref, key.objectid, key.offset,
root->root_key.objectid, false);
ret = btrfs_inc_extent_ref(trans, &ref);
if (ret) {
@@ -1123,8 +1123,8 @@ int replace_file_extents(struct btrfs_trans_handle *trans,
ref.len = num_bytes;
ref.parent = parent;
ref.owning_root = root->root_key.objectid;
- btrfs_init_data_ref(&ref, btrfs_header_owner(leaf),
- key.objectid, key.offset,
+ ref.ref_root = btrfs_header_owner(leaf);
+ btrfs_init_data_ref(&ref, key.objectid, key.offset,
root->root_key.objectid, false);
ret = btrfs_free_extent(trans, &ref);
if (ret) {
@@ -1339,8 +1339,8 @@ again:
ref.len = blocksize;
ref.parent = path->nodes[level]->start;
ref.owning_root = src->root_key.objectid;
- btrfs_init_tree_ref(&ref, level - 1, src->root_key.objectid,
- 0, true);
+ ref.ref_root = src->root_key.objectid;
+ btrfs_init_tree_ref(&ref, level - 1, 0, true);
ret = btrfs_inc_extent_ref(trans, &ref);
if (ret) {
btrfs_abort_transaction(trans, ret);
@@ -1352,8 +1352,8 @@ again:
ref.len = blocksize;
ref.parent = 0;
ref.owning_root = dest->root_key.objectid;
- btrfs_init_tree_ref(&ref, level - 1, dest->root_key.objectid, 0,
- true);
+ ref.ref_root = dest->root_key.objectid;
+ btrfs_init_tree_ref(&ref, level - 1, 0, true);
ret = btrfs_inc_extent_ref(trans, &ref);
if (ret) {
btrfs_abort_transaction(trans, ret);
@@ -1366,8 +1366,8 @@ again:
ref.len = blocksize;
ref.parent = path->nodes[level]->start;
ref.owning_root = 0;
- btrfs_init_tree_ref(&ref, level - 1, src->root_key.objectid,
- 0, true);
+ ref.ref_root = src->root_key.objectid;
+ btrfs_init_tree_ref(&ref, level - 1, 0, true);
ret = btrfs_free_extent(trans, &ref);
if (ret) {
btrfs_abort_transaction(trans, ret);
@@ -1380,8 +1380,8 @@ again:
ref.len = blocksize;
ref.parent = 0;
ref.owning_root = 0;
- btrfs_init_tree_ref(&ref, level - 1, dest->root_key.objectid,
- 0, true);
+ ref.ref_root = dest->root_key.objectid;
+ btrfs_init_tree_ref(&ref, level - 1, 0, true);
ret = btrfs_free_extent(trans, &ref);
if (ret) {
btrfs_abort_transaction(trans, ret);
@@ -2485,6 +2485,7 @@ static int do_relocation(struct btrfs_trans_handle *trans,
.len = blocksize,
.parent = upper->eb->start,
.owning_root = btrfs_header_owner(upper->eb),
+ .ref_root = btrfs_header_owner(upper->eb),
};
btrfs_set_node_blockptr(upper->eb, slot,
@@ -2494,7 +2495,6 @@ static int do_relocation(struct btrfs_trans_handle *trans,
btrfs_mark_buffer_dirty(trans, upper->eb);
btrfs_init_tree_ref(&ref, node->level,
- btrfs_header_owner(upper->eb),
root->root_key.objectid, false);
ret = btrfs_inc_extent_ref(trans, &ref);
if (!ret)