]> www.infradead.org Git - users/jedix/linux-maple.git/commit
maple_tree: Avoid BUG_ON() when setting a leaf node as a parent maple_v6.1-rc5_upstream
authorLiam R. Howlett <Liam.Howlett@Oracle.com>
Thu, 1 Sep 2022 01:03:02 +0000 (21:03 -0400)
committerLiam R. Howlett <Liam.Howlett@oracle.com>
Mon, 28 Nov 2022 20:18:34 +0000 (15:18 -0500)
commitf9f40ad2a8afaa9fd422c684d6c3fcf740b5823c
tree043667b06aeb9f50e2c2175357abe07351dda4cf
parent042d14d023809b9da840524e3c6befb18fe338d6
maple_tree: Avoid BUG_ON() when setting a leaf node as a parent

Don't crash the kernel in the very unlikely case that the node passed as
the parent is actually a leaf.  Instead, use MT_WARN_ON() to increase
the probability of the debug information being recorded.

Pass through the maple state so the maple tree can be retrieved.

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