]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
maple_tree: Use MAS_BUG_ON() from mas_topiary_range()
authorLiam R. Howlett <Liam.Howlett@oracle.com>
Thu, 1 Sep 2022 01:10:02 +0000 (21:10 -0400)
committerLiam R. Howlett <Liam.Howlett@oracle.com>
Thu, 27 Apr 2023 01:32:00 +0000 (21:32 -0400)
In the even of trying to remove data from a leaf node by use of
mas_topiary_range(), log the maple state.

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

index a7b0e22230b083952d5eee2567e56b3d7c9c3563..ac24a4f3b03c3982b3993eae60d8b214ad65896d 100644 (file)
@@ -2346,7 +2346,8 @@ static inline void mas_topiary_range(struct ma_state *mas,
        void __rcu **slots;
        unsigned char offset;
 
-       MT_BUG_ON(mas->tree, mte_is_leaf(mas->node));
+       MAS_BUG_ON(mas, mte_is_leaf(mas->node));
+
        slots = ma_slots(mas_mn(mas), mte_node_type(mas->node));
        for (offset = start; offset <= end; offset++) {
                struct maple_enode *enode = mas_slot_locked(mas, slots, offset);