]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
maple_tree: Fix MTREE_INIT
authorLiam R. Howlett <Liam.Howlett@Oracle.com>
Fri, 22 Jan 2021 19:38:29 +0000 (14:38 -0500)
committerLiam R. Howlett <Liam.Howlett@Oracle.com>
Fri, 22 Jan 2021 19:38:29 +0000 (14:38 -0500)
Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
lib/maple_tree.c

index 8809e750d195da1fdb44e731d75c7573ac93002a..b529bff1c1ad86c929ed333b4a8a811f18e73fd3 100644 (file)
@@ -5156,12 +5156,14 @@ static void mt_destroy_walk(struct rcu_head *head)
        void **slots;
        struct maple_node *node = container_of(head, struct maple_node, rcu);
        struct maple_enode *start;
-       struct maple_tree mt = MTREE_INIT(mt, node->ma_flags);
-       MA_STATE(mas, &mt, 0, 0);
+       struct maple_tree mt;
+       MA_STATE(mas, NULL, 0, 0);
 
        if (ma_is_leaf(node->type))
                goto free_leaf;
 
+       mtree_init(&mt, node->ma_flags);
+       mas.tree = &mt;
        start = mt_mk_node(node, node->type);
        mas.node = start;
        slots = mas_destroy_descend(&mas);