From: Liam R. Howlett Date: Thu, 18 May 2023 14:55:20 +0000 (-0400) Subject: maple_tree: use MAS_BUG_ON() in mas_set_height() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=5950ada963a6e26f318e54f873a4cc5769c1a3da;p=linux.git maple_tree: use MAS_BUG_ON() in mas_set_height() Use MAS_BUG_ON() instead of MT_BUG_ON() to get the maple state information. In the unlikely event of a tree height of > 31, try to increase the probability of useful information being logged. Link: https://lkml.kernel.org/r/20230518145544.1722059-12-Liam.Howlett@oracle.com Signed-off-by: Liam R. Howlett Cc: David Binderman Cc: Peng Zhang Cc: Sergey Senozhatsky Cc: Vernon Yang Cc: Wei Yang Signed-off-by: Andrew Morton --- diff --git a/lib/maple_tree.c b/lib/maple_tree.c index 33baa40bf34b7..1b1b60ab70b4d 100644 --- a/lib/maple_tree.c +++ b/lib/maple_tree.c @@ -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; }