[PATCH 09/28] maple_tree: Correct right ma_wr_state end pivot in mas_wr_spanning_store()

From: Liam R. Howlett

Date: Thu Jan 15 2026 - 14:37:42 EST


The end_piv will be needed in the next patch set and has not been set
correctly in this code path. Correct the oversight before using it.

Signed-off-by: Liam R. Howlett <Liam.Howlett@xxxxxxxxxx>
---
lib/maple_tree.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/lib/maple_tree.c b/lib/maple_tree.c
index e3b9d6687e6d7..8cefaebf414d3 100644
--- a/lib/maple_tree.c
+++ b/lib/maple_tree.c
@@ -3494,6 +3494,7 @@ static void mas_wr_spanning_store(struct ma_wr_state *wr_mas)
r_mas.index = r_mas.last;
mas_wr_walk_index(&r_wr_mas);
r_mas.last = r_mas.index = mas->last;
+ r_wr_mas.end_piv = r_wr_mas.r_max;

/* Set up left side. */
mas_wr_walk_index(wr_mas);
--
2.47.3