]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
maple_tree: clean up swithc statement and remove null parent assignment
authorLiam R. Howlett <Liam.Howlett@Oracle.com>
Thu, 3 Jan 2019 16:42:27 +0000 (11:42 -0500)
committerLiam R. Howlett <Liam.Howlett@Oracle.com>
Fri, 30 Oct 2020 18:55:05 +0000 (14:55 -0400)
Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
lib/maple_tree.c

index 06465e580e314f7ee446439634327569bbf429f0..7710b71941df25274b9d8f9b6a02533bb611b5ce 100644 (file)
@@ -304,8 +304,6 @@ static void ma_root_expand(struct ma_state *ms, void *entry)
        }
        ma_append(ms, entry);
 
-
-       mn->parent = NULL;
        /* swap the new root into the tree */
        rcu_assign_pointer(ms->tree->ma_root, mt_mk_node(mn, maple_leaf_64));
 }
@@ -415,8 +413,6 @@ void *ma_destroy_walk(struct ma_state *mas)
        int i;
 
        switch (type) {
-       case maple_leaf_64:
-               break;
        case maple_range_64:
                for (i = 0; i < MAPLE_RANGE64_SLOTS; i++) {
                        if (i > 0 && mn->mr64.pivot[i] == 0)
@@ -424,6 +420,7 @@ void *ma_destroy_walk(struct ma_state *mas)
                        ma_destroy_walk(mn->mr64.slot[i]);
                }
                break;
+       case maple_leaf_64:
        default:
                break;
        }