ma_set_meta(newnode, maple_leaf_64, 0, new_end);
}
- if (likely(mt_in_rcu(mas->tree))) {
+ if (mt_in_rcu(mas->tree)) {
mas->node = mt_mk_node(newnode, mt);
mas_replace(mas, false);
} else {
if (mas->last > end_piv)
end_piv = mas->max;
- // FIXME: Try finding end offset out here and passing it through.
- // Maybe a struct for writes?
- // lmax and offset_end ?
-
if (!entry) {
/* Check next slot(s) if we are overwriting the end */
if ((mas->last == end_piv) && !slots[offset_end + 1]) {
goto slow_path;
if ((offset_end - mas->offset <= 1) &&
- mas_slot_store(mas, entry, r_min, r_max, end_piv, end, content, mt, slots))
+ mas_slot_store(mas, entry, r_min, r_max, end_piv, end, content, mt,
+ slots))
return content;
- else if (mas_node_store(mas, entry, r_min, r_max, end, content, mt, slots, pivots,
- offset_end))
+ else if (mas_node_store(mas, entry, r_min, r_max, end, content, mt,
+ slots, pivots, offset_end))
return content;
if (mas_is_err(mas))
slow_path:
b_node.type = mte_node_type(mas->node);
- b_node.b_end = mas_store_b_node(mas, &b_node, entry, end, offset_end, content);
+ b_node.b_end = mas_store_b_node(mas, &b_node, entry, end, offset_end,
+ content);
b_node.min = mas->min;
zero = MAPLE_BIG_NODE_SLOTS - b_node.b_end - 1;