maple_tree: should get pivots boundary by type
authorWei Yang <richard.weiyang@gmail.com>
Sat, 12 Nov 2022 23:43:08 +0000 (23:43 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Feb 2023 10:28:08 +0000 (11:28 +0100)
commite0514483fa88f4e4960a080ad0613c1503386f34
treeae707b42c083967a4c8fa227cff8b4f1ad684dd1
parent29e774dcb27116c06b9c57b1f1f14a1623738989
maple_tree: should get pivots boundary by type

[ Upstream commit ab6ef70a8b0d314c2160af70b0de984664d675e0 ]

We should get pivots boundary by type.  Fixes a potential overindexing of
mt_pivots[].

Link: https://lkml.kernel.org/r/20221112234308.23823-1-richard.weiyang@gmail.com
Fixes: 54a611b60590 ("Maple Tree: add new data structure")
Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
Reviewed-by: Liam R. Howlett <Liam.Howlett@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
lib/maple_tree.c