]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
maple_tree: Use MAS_BUG_ON() in mas_set_height()
authorLiam R. Howlett <Liam.Howlett@oracle.com>
Thu, 1 Sep 2022 01:06:49 +0000 (21:06 -0400)
committerLiam R. Howlett <Liam.Howlett@oracle.com>
Thu, 27 Apr 2023 01:32:00 +0000 (21:32 -0400)
Use MAS_BUG_ON() instead of MT_BUG_ON() to get the maple state
information.  In the unlikely even of a tree height of > 31, try to increase
the probability of useful information being logged.

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

index e83e00eec9c44630c88521b221a8a988e0099b9f..a7b0e22230b083952d5eee2567e56b3d7c9c3563 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;
-       MT_BUG_ON(mas->tree, mas->depth > MAPLE_HEIGHT_MAX);
+       MAS_BUG_ON(mas, mas->depth > MAPLE_HEIGHT_MAX);
        new_flags |= mas->depth << MT_FLAGS_HEIGHT_OFFSET;
        mas->tree->ma_flags = new_flags;
 }