Commit d0411860 authored by Liam R. Howlett's avatar Liam R. Howlett Committed by Andrew Morton

maple_tree: mas_start() reset depth on dead node

When a dead node is detected, the depth has already been set to 1 so reset
it to 0.

Link: https://lkml.kernel.org/r/20230518145544.1722059-22-Liam.Howlett@oracle.comSigned-off-by: default avatarLiam R. Howlett <Liam.Howlett@oracle.com>
Reviewed-by: default avatarPeng Zhang <zhangpeng.00@bytedance.com>
Cc: David Binderman <dcb314@hotmail.com>
Cc: Sergey Senozhatsky <senozhatsky@chromium.org>
Cc: Vernon Yang <vernon2gm@gmail.com>
Cc: Wei Yang <richard.weiyang@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 23e734ec
...@@ -1396,9 +1396,9 @@ static inline struct maple_enode *mas_start(struct ma_state *mas) ...@@ -1396,9 +1396,9 @@ static inline struct maple_enode *mas_start(struct ma_state *mas)
mas->min = 0; mas->min = 0;
mas->max = ULONG_MAX; mas->max = ULONG_MAX;
mas->depth = 0;
retry: retry:
mas->depth = 0;
root = mas_root(mas); root = mas_root(mas);
/* Tree with nodes */ /* Tree with nodes */
if (likely(xa_is_node(root))) { if (likely(xa_is_node(root))) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment