]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
maple_tree: Clean up splitting name and add exception to validate
authorLiam R. Howlett <Liam.Howlett@Oracle.com>
Tue, 4 Aug 2020 14:28:59 +0000 (10:28 -0400)
committerLiam R. Howlett <Liam.Howlett@Oracle.com>
Fri, 30 Oct 2020 19:08:57 +0000 (15:08 -0400)
Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
lib/maple_tree.c

index 1bf8b7a8d6448eacc085d165c03fcc8864d6fd87..46864639a091b5ce964e2246e87decb413f74876 100644 (file)
@@ -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