From ea5493cd499f1a692370e6604a08c3e102c1a41d Mon Sep 17 00:00:00 2001 From: "Liam R. Howlett" Date: Wed, 2 Mar 2022 22:22:37 -0500 Subject: [PATCH] maple_tree: Fix spannint store mast->r->max Signed-off-by: Liam R. Howlett --- lib/maple_tree.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/maple_tree.c b/lib/maple_tree.c index cf7d415441ca..a53dc391f055 100644 --- a/lib/maple_tree.c +++ b/lib/maple_tree.c @@ -2680,22 +2680,19 @@ static inline void mast_cp_to_nodes(struct maple_subtree_state *mast, mast->l->min = mast->orig_l->min; mab_mas_cp(mast->bn, 0, split, mast->l, true); - if (split == mast->bn->b_end) { + if (split == mast->bn->b_end) mast->l->max = mast->orig_r->max; - } if (middle) { mab_mas_cp(mast->bn, 1 + split, mid_split, mast->m, true); mast->m->min = mast->bn->pivot[split] + 1; - mast->m->max = mast->bn->pivot[mid_split]; split = mid_split; } + mast->r->max = mast->orig_r->max; if (right) { - mab_mas_cp(mast->bn, 1 + split, mast->bn->b_end, mast->r, true); + mab_mas_cp(mast->bn, 1 + split, mast->bn->b_end, mast->r, false); mast->r->min = mast->bn->pivot[split] + 1; - } else { - mast->r->max = mast->l->max; } } -- 2.50.1