From 0ee109d7bf2c45e98750ffb7c561de15e9dbaa24 Mon Sep 17 00:00:00 2001 From: "Liam R. Howlett" Date: Wed, 8 Oct 2025 19:30:05 -0400 Subject: [PATCH] maple_tree: remove setting the maple state end in wr_mas_setup() wr_mas_setup() is called from three places but the end is only needed to be set in one. Remove the unnecessary call paths. Signed-off-by: Liam R. Howlett --- lib/maple_tree.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/maple_tree.c b/lib/maple_tree.c index 6d36303aafd9..a5fb25cf3bf5 100644 --- a/lib/maple_tree.c +++ b/lib/maple_tree.c @@ -1453,8 +1453,6 @@ void wr_mas_setup(struct ma_wr_state *wr_mas, struct ma_state *mas) wr_mas->node = mas_mn(mas); wr_mas->type = mte_node_type(mas->node); wr_mas->pivots = ma_pivots(wr_mas->node, wr_mas->type); - mas->end = ma_data_end(wr_mas->node, wr_mas->type, wr_mas->pivots, - mas->max); wr_mas->slots = ma_slots(wr_mas->node, wr_mas->type); wr_mas->r_min = mas_safe_min(mas, wr_mas->pivots, mas->offset); wr_mas->r_max = mas_safe_pivot(mas, wr_mas->pivots, mas->offset, @@ -1468,6 +1466,8 @@ void wr_mas_ascend(struct ma_wr_state *wr_mas) mas_ascend(mas); wr_mas_setup(wr_mas, mas); + mas->end = ma_data_end(wr_mas->node, wr_mas->type, wr_mas->pivots, + mas->max); /* Careful, this may be wrong.. */ wr_mas->end_piv = wr_mas->r_max; wr_mas->offset_end = mas->offset; -- 2.51.0