|
@@ -1089,7 +1089,8 @@ static noinline int __btrfs_cow_block(struct btrfs_trans_handle *trans,
|
|
|
btrfs_set_node_ptr_generation(parent, parent_slot,
|
|
|
trans->transid);
|
|
|
btrfs_mark_buffer_dirty(parent);
|
|
|
- tree_mod_log_free_eb(root->fs_info, buf);
|
|
|
+ if (last_ref)
|
|
|
+ tree_mod_log_free_eb(root->fs_info, buf);
|
|
|
btrfs_free_tree_block(trans, root, buf, parent_start,
|
|
|
last_ref);
|
|
|
}
|