From: Liam R. Howlett Date: Tue, 26 Aug 2025 17:02:53 +0000 (-0400) Subject: debug and warn on X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=659bb57a84803b7f7fec9c61c373954d4f17accf;p=users%2Fjedix%2Flinux-maple.git debug and warn on Signed-off-by: Liam R. Howlett --- diff --git a/lib/maple_tree.c b/lib/maple_tree.c index 855276838015..a32ed19b0978 100644 --- a/lib/maple_tree.c +++ b/lib/maple_tree.c @@ -1740,6 +1740,8 @@ static inline void mas_adopt_children(struct ma_state *mas, unsigned char offset; offset = ma_data_end(node, type, pivots, mas->max); + WARN_ON_ONCE(offset == 0); + printk("Adopt %p 0 - %u\n", node, offset); do { child = mas_slot_locked(mas, slots, offset); mas_set_parent(mas, child, parent, offset); @@ -1761,13 +1763,10 @@ static inline void mas_put_in_tree(struct ma_state *mas, void __rcu **slots; if (mte_is_root(mas->node)) { - printk("new root in tree\n"); mas_mn(mas)->parent = ma_parent_ptr(mas_tree_parent(mas)); rcu_assign_pointer(mas->tree->ma_root, mte_mk_root(mas->node)); mt_set_height(mas->tree, new_height); } else { - - printk("Replace node in tree\n"); offset = mte_parent_slot(mas->node); slots = ma_slots(mte_parent(mas->node), mas_parent_type(mas, mas->node)); @@ -3331,7 +3330,6 @@ static bool spanning_ascend(struct maple_copy *cp, struct ma_state *mas, return false; } - printk("\t\t\t\td_count %u\n", cp->d_count); printk("more nodes.. %u\n", cp->end); wr_mas_ascend(l_wr_mas); wr_mas_ascend(r_wr_mas);