Signed-off-by: Chris Mason <chris.mason@oracle.com>
parent_buf = path->nodes[level + 1];
pslot = path->slots[level + 1];
+ /*
+ * deal with the case where there is only one pointer in the root
+ * by promoting the node below to a root
+ */
if (!parent_buf) {
struct btrfs_buffer *child;
u64 blocknr = mid_buf->blocknr;
int ret;
int wret;
+ /* first try to make some room by pushing left and right */
wret = push_leaf_left(trans, root, path, data_size);
if (wret < 0)
return wret;