From 31f071b86b98250135404422bca948735b37410f Mon Sep 17 00:00:00 2001 From: "Liam R. Howlett" Date: Wed, 24 Nov 2021 11:51:25 -0500 Subject: [PATCH] maple_tree: Rename _mas_awalk() to mas_anode_descend() and fix potential error skip Signed-off-by: Liam R. Howlett --- lib/maple_tree.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/maple_tree.c b/lib/maple_tree.c index 43c378554441..6522b407c023 100644 --- a/lib/maple_tree.c +++ b/lib/maple_tree.c @@ -4953,7 +4953,7 @@ ascend: return false; } -static inline bool _mas_awalk(struct ma_state *mas, unsigned long size) +static inline bool mas_anode_descend(struct ma_state *mas, unsigned long size) { enum maple_type type = mte_node_type(mas->node); unsigned long pivot, min, gap = 0; @@ -4999,6 +4999,8 @@ static inline bool _mas_awalk(struct ma_state *mas, unsigned long size) mas->min = min; mas->max = pivot; offset = 0; + type = mte_node_type(mas->node); + count = mt_slots[type]; break; } } @@ -5116,7 +5118,7 @@ static inline void mas_awalk(struct ma_state *mas, unsigned long size) * no gap found. (return, slot == MAPLE_NODE_SLOTS) * found the gap. (return, slot != MAPLE_NODE_SLOTS) */ - while (!mas_is_err(mas) && !_mas_awalk(mas, size)) { + while (!mas_is_err(mas) && !mas_anode_descend(mas, size)) { if (last == mas->node) mas_skip_node(mas); else -- 2.50.1