From: Liam R. Howlett Date: Thu, 18 May 2023 14:55:30 +0000 (-0400) Subject: maple_tree: mas_start() reset depth on dead node X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=d04118605f65929003c2a71229d45fee00207a1b;p=linux.git 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.com Signed-off-by: Liam R. Howlett Reviewed-by: Peng Zhang Cc: David Binderman Cc: Sergey Senozhatsky Cc: Vernon Yang Cc: Wei Yang Signed-off-by: Andrew Morton --- diff --git a/lib/maple_tree.c b/lib/maple_tree.c index 136aab920f95e..9eec4350d22bf 100644 --- a/lib/maple_tree.c +++ b/lib/maple_tree.c @@ -1396,9 +1396,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))) {