The quilt patch titled Subject: maple_tree: set the node limit when creating a new root node has been removed from the -mm tree. Its filename was maple_tree-set-the-node-limit-when-creating-a-new-root-node.patch This patch was dropped because it was merged into the mm-hotfixes-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm ------------------------------------------------------ From: Peng Zhang <zhangpeng.00@xxxxxxxxxxxxx> Subject: maple_tree: set the node limit when creating a new root node Date: Tue, 11 Jul 2023 11:54:37 +0800 Set the node limit of the root node so that the last pivot of all nodes is the node limit (if the node is not full). This patch also fixes a bug in mas_rev_awalk(). Effectively, always setting a maximum makes mas_logical_pivot() behave as mas_safe_pivot(). Without this fix, it is possible that very small tasks would fail to find the correct gap. Although this has not been observed with real tasks, it has been reported to happen in m68k nommu running the maple tree tests. Link: https://lkml.kernel.org/r/20230711035444.526-1-zhangpeng.00@xxxxxxxxxxxxx Link: https://lore.kernel.org/linux-mm/CAMuHMdV4T53fOw7VPoBgPR7fP6RYqf=CBhD_y_vOg53zZX_DnA@xxxxxxxxxxxxxx/ Link: https://lkml.kernel.org/r/20230711035444.526-2-zhangpeng.00@xxxxxxxxxxxxx Fixes: 54a611b60590 ("Maple Tree: add new data structure") Signed-off-by: Peng Zhang <zhangpeng.00@xxxxxxxxxxxxx> Reviewed-by: Liam R. Howlett <Liam.Howlett@xxxxxxxxxx> Tested-by: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx> Cc: <stable@xxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- lib/maple_tree.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/lib/maple_tree.c~maple_tree-set-the-node-limit-when-creating-a-new-root-node +++ a/lib/maple_tree.c @@ -3692,7 +3692,8 @@ static inline int mas_root_expand(struct mas->offset = slot; pivots[slot] = mas->last; if (mas->last != ULONG_MAX) - slot++; + pivots[++slot] = ULONG_MAX; + mas->depth = 1; mas_set_height(mas); ma_set_meta(node, maple_leaf_64, 0, slot); _ Patches currently in -mm which might be from zhangpeng.00@xxxxxxxxxxxxx are maple_tree-add-test-for-mas_wr_modify-fast-path.patch maple_tree-add-test-for-expanding-range-in-rcu-mode.patch maple_tree-optimize-mas_wr_append-also-improve-duplicating-vmas.patch maple_tree-add-a-fast-path-case-in-mas_wr_slot_store.patch maple_tree-dont-use-maple_arange64_meta_max-to-indicate-no-gap.patch maple_tree-make-mas_validate_gaps-to-check-metadata.patch maple_tree-fix-mas_validate_child_slot-to-check-last-missed-slot.patch maple_tree-make-mas_validate_limits-check-root-node-and-node-limit.patch maple_tree-update-mt_validate.patch maple_tree-replace-mas_logical_pivot-with-mas_safe_pivot.patch maple_tree-drop-mas_first_entry.patch