maple_tree: add testing for restoring maple state to active
authorLiam R. Howlett <Liam.Howlett@oracle.com>
Tue, 24 Jun 2025 15:48:23 +0000 (11:48 -0400)
committerAndrew Morton <akpm@linux-foundation.org>
Thu, 10 Jul 2025 05:42:22 +0000 (22:42 -0700)
commit1f0bce2fa8c6bfd65cf78ad6ef6e0948fc55c7bb
tree17cc4dc3c2220e053b147eb1ff950325ef2af1b4
parent12f1d7931283106306a8822c5279013b8a0f1242
maple_tree: add testing for restoring maple state to active

Restoring maple status to ma_active on overflow/underflow when mas->node
was NULL could have happened in the past, but was masked by a bug in
mas_walk().  Add test cases that triggered the bug when the node was
mas->node prior to fixing the maple state setup.

Add a few extra tests around restoring the active maple status.

Link: https://lore.kernel.org/all/202506191556.6bfc7b93-lkp@intel.com/
Link: https://lkml.kernel.org/r/20250624154823.52221-2-Liam.Howlett@oracle.com
Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
Reviewed-by: Wei Yang <richard.weiyang@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
lib/test_maple_tree.c