From b644a5298e94544d008bae7491a03add1a7125ed Mon Sep 17 00:00:00 2001 From: "Liam R. Howlett" Date: Tue, 4 Aug 2020 10:28:59 -0400 Subject: [PATCH] maple_tree: Clean up splitting name and add exception to validate Signed-off-by: Liam R. Howlett --- lib/maple_tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/maple_tree.c b/lib/maple_tree.c index 1bf8b7a8d644..46864639a091 100644 --- a/lib/maple_tree.c +++ b/lib/maple_tree.c @@ -1487,7 +1487,7 @@ static inline int mab_no_null_split(struct maple_big_node *b_node, /* If the split is less than the max slot && the right side will * still be sufficient, then increment the split on NULL. */ - if ((split < mt_slots[b_node->type] - 1) && + if ((split < slot_cnt - 1) && (b_node->b_end - split) < (mt_min_slots[b_node->type])) split++; else -- 2.50.1