]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
mm/mmap: Use mtree_init() in mt_destroy_walk()
authorLiam R. Howlett <Liam.Howlett@Oracle.com>
Mon, 1 Feb 2021 18:48:20 +0000 (13:48 -0500)
committerLiam R. Howlett <Liam.Howlett@Oracle.com>
Mon, 1 Feb 2021 18:48:20 +0000 (13:48 -0500)
Don't use MTREE_INIT()

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

index 19887e46720c779b3ee6d108e552b57b4a59eb2e..ba89ebfc2af0a6b9919996fe75f85a435b71231b 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);