From de65cd6e5922a067afa5412bdcae7d624a3639b2 Mon Sep 17 00:00:00 2001 From: "Liam R. Howlett" Date: Thu, 3 Dec 2020 22:44:49 -0500 Subject: [PATCH] maple_tree: Change __mas_walk and mas_wr_walk to directly use type. The node type is known, so don't look it up again Signed-off-by: Liam R. Howlett --- lib/maple_tree.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/maple_tree.c b/lib/maple_tree.c index 8ae58d1fd6e4..1b678ef90c05 100644 --- a/lib/maple_tree.c +++ b/lib/maple_tree.c @@ -3050,7 +3050,8 @@ bool mas_wr_walk(struct ma_state *mas, unsigned long *range_min, // Traverse. mas->max = *range_max; mas->min = *range_min; - mas->node = mas_get_slot(mas, mas->offset); + mas->node = mas_slot_locked(mas, ma_slots(mas_mn(mas), type), + mas->offset); mas->offset = 0; } return true; @@ -3129,7 +3130,7 @@ static inline bool __mas_walk(struct ma_state *mas, unsigned long *range_min, if (unlikely(ma_is_leaf(type))) return true; - next = mas_get_slot(mas, mas->offset); + next = mas_slot(mas, ma_slots(mas_mn(mas), type), mas->offset); if (unlikely(!next)) return false; -- 2.50.1