]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
maple_tree: mas_start() reset depth on dead node
authorLiam R. Howlett <Liam.Howlett@oracle.com>
Mon, 3 Apr 2023 15:54:21 +0000 (11:54 -0400)
committerLiam R. Howlett <Liam.Howlett@oracle.com>
Thu, 27 Apr 2023 01:40:54 +0000 (21:40 -0400)
When a dead node is detected, the depth has already been set to 1 so
reset it to 0.

Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
lib/maple_tree.c

index 5b613d5b11d4aab1e7e3af0ef70d43913f447572..eda41f6b264b897082f05e5fa76ff4a681691f3e 100644 (file)
@@ -1397,9 +1397,9 @@ static inline struct maple_enode *mas_start(struct ma_state *mas)
 
                mas->min = 0;
                mas->max = ULONG_MAX;
-               mas->depth = 0;
 
 retry:
+               mas->depth = 0;
                root = mas_root(mas);
                /* Tree with nodes */
                if (likely(xa_is_node(root))) {