summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorLiam R. Howlett <Liam.Howlett@oracle.com>2023-05-18 17:55:30 +0300
committerAndrew Morton <akpm@linux-foundation.org>2023-06-10 02:25:32 +0300
commitd04118605f65929003c2a71229d45fee00207a1b (patch)
tree76a108759b2815e291ea2b9b0b8300afdc5b8839 /lib
parent23e734ecd97fb0dec1537960040e7ef0d5ef7ae6 (diff)
downloadlinux-d04118605f65929003c2a71229d45fee00207a1b.tar.xz
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 <Liam.Howlett@oracle.com> Reviewed-by: Peng 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: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/maple_tree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/maple_tree.c b/lib/maple_tree.c
index 136aab920f95..9eec4350d22b 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))) {