From: Liam R. Howlett Date: Tue, 12 Oct 2021 19:18:33 +0000 (-0400) Subject: maple_tree: Drop depth cpoy in spanning store and increment in mas_walk() X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=6229b56a9023d80be14dd7e6c40f493efb180247;p=users%2Fjedix%2Flinux-maple.git maple_tree: Drop depth cpoy in spanning store and increment in mas_walk() Signed-off-by: Liam R. Howlett --- diff --git a/lib/maple_tree.c b/lib/maple_tree.c index 580ef5024422..6e202bf6f08f 100644 --- a/lib/maple_tree.c +++ b/lib/maple_tree.c @@ -3738,7 +3738,6 @@ static inline bool __mas_walk(struct ma_state *mas, unsigned long *range_min, next = mas->node; while (true) { - mas->depth++; node = mte_to_node(next); type = mte_node_type(next); mas_node_walk(mas, node, type, range_min, range_max); @@ -3845,7 +3844,6 @@ static inline int mas_spanning_store(struct ma_state *mas, void *entry) /* Set up right side. */ r_mas = *mas; - r_mas.depth = mas->depth; /* Avoid overflow. */ if (r_mas.last + 1) r_mas.last++; @@ -3857,7 +3855,6 @@ static inline int mas_spanning_store(struct ma_state *mas, void *entry) /* Set up left side. */ l_mas = *mas; - l_mas.depth = mas->depth; l_mas.offset = 0; __mas_walk(&l_mas, &range_min, &range_max); content = mas_get_slot(&l_mas, l_mas.offset);