mab_mas_cp() at least copy one pivot, which is pivot 0. This means the pivot 0 set by mte_set_pivot() will be overwritten. Just remote this redundant code. Signed-off-by: Wei Yang <richard.weiyang@xxxxxxxxx> --- lib/maple_tree.c | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/maple_tree.c b/lib/maple_tree.c index 31964c5c677a..b02d812e1489 100644 --- a/lib/maple_tree.c +++ b/lib/maple_tree.c @@ -3174,7 +3174,6 @@ static inline void mast_split_data(struct maple_subtree_state *mast, unsigned char p_slot; mab_mas_cp(mast->bn, 0, split, mast->l, true); - mte_set_pivot(mast->r->node, 0, mast->r->max); mab_mas_cp(mast->bn, split + 1, mast->bn->b_end, mast->r, false); mast->l->offset = mte_parent_slot(mas->node); mast->r->min = mast->l->max + 1; -- 2.34.1