//printk("\t\t%s\n", __func__);
//mt_dump(mas->tree, mt_dump_hex);
height = mas_mt_height(mas);
- /* FIXME: Save this? */
- total = mas_wr_new_end(wr_mas);
- split = (total + 1) / 2;
mas->depth = height;
/* First split the leaves */
mns_node_init(&left, mas_pop_node(mas), wr_mas->type);
mns_node_init(&right, mas_pop_node(mas), wr_mas->type);
mns_mas_init(&src, mas);
- mns_node_part_leaf_init(&ma_part, wr_mas, &src);
src.max = mas->max;
src.min = mas->min;
+ mns_node_part_leaf_init(&ma_part, wr_mas, &src);
+ total = mas->end + ma_part.size - 1;
+ split = (total + 1) / 2;
if (mt_is_alloc(mas->tree))
right.alloc = left.alloc = true;