summaryrefslogtreecommitdiff
path: root/ctree.c
diff options
context:
space:
mode:
Diffstat (limited to 'ctree.c')
-rw-r--r--ctree.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ctree.c b/ctree.c
index 4f7e6d0..0e2fe7f 100644
--- a/ctree.c
+++ b/ctree.c
@@ -686,6 +686,9 @@ static int balance_level(struct btrfs_trans_handle *trans,
/* promote the child to a root */
child = read_node_slot(root, mid, 0);
BUG_ON(!child);
+ ret = btrfs_cow_block(trans, root, child, mid, 0, &child);
+ BUG_ON(ret);
+
root->node = child;
path->nodes[level] = NULL;
clean_tree_block(trans, root, mid);