]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
maple_tree: Drop depth cpoy in spanning store and increment in mas_walk()
authorLiam R. Howlett <Liam.Howlett@oracle.com>
Tue, 12 Oct 2021 19:18:33 +0000 (15:18 -0400)
committerLiam R. Howlett <Liam.Howlett@oracle.com>
Wed, 20 Oct 2021 19:23:10 +0000 (15:23 -0400)
Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
lib/maple_tree.c

index 580ef50244221ce68e46e16f54ba30fae386f7b2..6e202bf6f08f53055425fa6edeeeab2403f85d0e 100644 (file)
@@ -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);