diff mbox series

[2/2] maple_tree: not necessary to set pivot 0 before mab_mas_cp()

Message ID 20240915012548.31724-3-richard.weiyang@gmail.com (mailing list archive)
State New
Headers show
Series cleanup mast_split_data() | expand

Commit Message

Wei Yang Sept. 15, 2024, 1:25 a.m. UTC
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@gmail.com>
---
 lib/maple_tree.c | 1 -
 1 file changed, 1 deletion(-)
diff mbox series

Patch

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;