]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
maple_tree: Convert BUG_ON() to MT_BUG_ON()
authorLiam R. Howlett <Liam.Howlett@Oracle.com>
Wed, 31 Aug 2022 18:55:26 +0000 (14:55 -0400)
committerLiam R. Howlett <Liam.Howlett@oracle.com>
Thu, 27 Apr 2023 01:32:00 +0000 (21:32 -0400)
Use MT_BUG_ON() to get more information when running with
MAPLE_TREE_DEBUG enabled.

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

index 7a1251e7f8dca8e984ea2fe67b4348a215067269..a62f41eac9525beb617b13492ff94ee7415721af 100644 (file)
@@ -194,7 +194,7 @@ static void mas_set_height(struct ma_state *mas)
        unsigned int new_flags = mas->tree->ma_flags;
 
        new_flags &= ~MT_FLAGS_HEIGHT_MASK;
-       BUG_ON(mas->depth > MAPLE_HEIGHT_MAX);
+       MT_BUG_ON(mas->tree, mas->depth > MAPLE_HEIGHT_MAX);
        new_flags |= mas->depth << MT_FLAGS_HEIGHT_OFFSET;
        mas->tree->ma_flags = new_flags;
 }