From 270516a1b16a056f61fcefd5c69dbde4f04a11df Mon Sep 17 00:00:00 2001 From: "Liam R. Howlett" Date: Tue, 29 Sep 2020 09:35:25 -0400 Subject: [PATCH] maple_tree: Use ma_slots() instead of mas_get_slot() in _mas_awalk() Signed-off-by: Liam R. Howlett --- lib/maple_tree.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/maple_tree.c b/lib/maple_tree.c index 0ed7192ae54a..f31c7399dd25 100644 --- a/lib/maple_tree.c +++ b/lib/maple_tree.c @@ -3636,6 +3636,7 @@ static inline bool _mas_awalk(struct ma_state *mas, unsigned long size) unsigned long pivot, min, gap = 0; unsigned char offset = 0, pivot_cnt = mt_pivots[type]; unsigned long *gaps = NULL, *pivots = ma_pivots(mas_mn(mas), type); + void **slots = ma_slots(mas_mn(mas), type); bool found = false; if (ma_is_dense(type)) { @@ -3660,9 +3661,8 @@ static inline bool _mas_awalk(struct ma_state *mas, unsigned long size) if (gaps) gap = gaps[offset]; - else if (!mas_get_slot(mas, offset)) - gap = min(pivot, mas->last) - - max(mas->index, min) + 1; + else if (!mas_slot(mas, slots, offset)) + gap = min(pivot, mas->last) - max(mas->index, min) + 1; else goto next_slot; @@ -3672,7 +3672,7 @@ static inline bool _mas_awalk(struct ma_state *mas, unsigned long size) goto done; } if (mas->index <= pivot) { - mas->node = mas_get_slot(mas, offset); + mas->node = mas_slot(mas, slots, offset); mas->min = min; mas->max = pivot; offset = 0; -- 2.50.1