From: Liam R. Howlett Date: Wed, 24 Nov 2021 16:51:25 +0000 (-0500) Subject: maple_tree: Rename _mas_awalk() to mas_anode_descend() and fix potential error skip X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=31f071b86b98250135404422bca948735b37410f;p=users%2Fjedix%2Flinux-maple.git maple_tree: Rename _mas_awalk() to mas_anode_descend() and fix potential error skip Signed-off-by: Liam R. Howlett --- diff --git a/lib/maple_tree.c b/lib/maple_tree.c index 43c378554441d..6522b407c0238 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