]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
wip: Add height reset to destroy and debug output.
authorLiam R. Howlett <Liam.Howlett@Oracle.com>
Wed, 24 Jun 2020 00:10:56 +0000 (20:10 -0400)
committerLiam R. Howlett <Liam.Howlett@Oracle.com>
Fri, 30 Oct 2020 19:04:59 +0000 (15:04 -0400)
Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
lib/maple_tree.c

index 7e79a6aa395e6054873fde32d92873c32bfc5609..0081213c1a4f5a3b99a041b4391d79583f8aacd1 100644 (file)
@@ -4610,6 +4610,7 @@ void mtree_destroy(struct maple_tree *mt)
                mte_destroy_walk(destroyed, mt);
 
        mt->ma_flags = 0;
+       mt->ma_height = 0;
        rcu_assign_pointer(mt->ma_root, NULL);
        mtree_unlock(mt);
 }
@@ -4798,8 +4799,8 @@ void mt_dump(const struct maple_tree *mt)
 {
        void *entry = mt->ma_root;
 
-       pr_info("maple_tree("MA_PTR") flags %X, root "MA_PTR"\n",
-                mt, mt->ma_flags, entry);
+       pr_info("maple_tree("MA_PTR") flags %X, height %u root "MA_PTR"\n",
+                mt, mt->ma_flags, mt->ma_height, entry);
        if (!xa_is_node(entry))
                mt_dump_entry(entry, 0, 0, 0);
        else if (entry)