maple_tree: fix mas_validate_child_slot() to check last missed slot
authorPeng Zhang <zhangpeng.00@bytedance.com>
Tue, 11 Jul 2023 03:54:40 +0000 (11:54 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 18 Aug 2023 17:12:21 +0000 (10:12 -0700)
commite93fda5a1ab7a0c6143ae8a6f231c9f5f3c417b1
tree356e9d3a1d6ba61df203dab24fb7e2b5a50649cd
parentf8e5eac8abe3d26106e5470c735058f04f60f61e
maple_tree: fix mas_validate_child_slot() to check last missed slot

Don't break the loop before checking the last slot.  Also here check if
non-leaf nodes are missing children.

Link: https://lkml.kernel.org/r/20230711035444.526-5-zhangpeng.00@bytedance.com
Signed-off-by: Peng Zhang <zhangpeng.00@bytedance.com>
Reviewed-by: Liam R. Howlett <Liam.Howlett@oracle.com>
Tested-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
lib/maple_tree.c