]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
maple_tree: Remove BUG_ON() debug
authorLiam R. Howlett <Liam.Howlett@Oracle.com>
Sat, 5 Dec 2020 20:36:34 +0000 (15:36 -0500)
committerLiam R. Howlett <Liam.Howlett@Oracle.com>
Tue, 5 Jan 2021 17:33:33 +0000 (12:33 -0500)
Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
lib/maple_tree.c

index 1b678ef90c05cb37ab5a2d77b5d9de7f800fd0a5..8d8e16f8eb366f37cff44baa9acab394030685da 100644 (file)
@@ -861,7 +861,6 @@ static inline struct maple_node *mas_pop_node(struct ma_state *mas)
        }
 
        if (!node->node_count) { // Single allocation in this node.
-               BUG_ON(!node->slot[0]);
                mas->alloc = node->slot[0];
                mas->alloc->total = node->total - 1;
                ret = node;
@@ -2350,7 +2349,6 @@ static inline int mas_spanning_rebalance(struct ma_state *mas,
        mast->destroy = &destroy;
        l_mas.node = r_mas.node = m_mas.node = MAS_NONE;
 
-       MT_BUG_ON(mas->tree, mast->orig_l->depth != mast->orig_r->depth);
        mast->orig_l->depth = 0;
        mast_topiary(mast);
        while (count--) {
@@ -2467,7 +2465,6 @@ static inline int mas_rebalance(struct ma_state *mas,
        mas_dup_state(&r_mas, mas);
 
        if (mas_next_sibling(&r_mas)) {
-               MT_BUG_ON(r_mas.tree, mas_is_none(&r_mas));
                mas_mab_cp(&r_mas, 0, mt_slot_count(r_mas.node), b_node, b_end);
                r_mas.last = r_mas.index = r_mas.max;
 
@@ -3193,8 +3190,6 @@ static inline int mas_spanning_store(struct ma_state *mas, void *entry)
        l_mas.offset = 0;
        __mas_walk(&l_mas, &range_min, &range_max);
 
-       MT_BUG_ON(mas->tree, l_mas.depth != r_mas.depth);
-
        if (!entry) {
                mas_extend_null(&l_mas, &r_mas);
                mas->index = l_mas.index;