Use MT_WARN_ON() instead of MT_BUG_ON() as to avoid crashing the kernel.
In the unlikely even of a tree height of > 31, try to increase the
probability of the error being logged.
Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
unsigned int new_flags = mas->tree->ma_flags;
new_flags &= ~MT_FLAGS_HEIGHT_MASK;
- MT_BUG_ON(mas->tree, mas->depth > MAPLE_HEIGHT_MAX);
+ MT_WARN_ON(mas->tree, mas->depth > MAPLE_HEIGHT_MAX);
new_flags |= mas->depth << MT_FLAGS_HEIGHT_OFFSET;
mas->tree->ma_flags = new_flags;
}