From 95cf4a7334497a5a97c41d5ea4960521722f9021 Mon Sep 17 00:00:00 2001 From: "Liam R. Howlett" Date: Fri, 7 Aug 2020 07:59:31 -0400 Subject: [PATCH] maple_tree: Fix tracing order Signed-off-by: Liam R. Howlett --- lib/maple_tree.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/maple_tree.c b/lib/maple_tree.c index 99b5b9b8724a..fa766d952580 100644 --- a/lib/maple_tree.c +++ b/lib/maple_tree.c @@ -2363,7 +2363,7 @@ static inline int mas_rebalance(struct ma_state *mas, MA_STATE(l_mas, mas->tree, mas->index, mas->last); MA_STATE(r_mas, mas->tree, mas->index, mas->last); - trace_mas_rebalance(mas, b_node); + trace_mas_rebalance(mas); mas_node_cnt(mas, 1 + empty_cnt * 2); if (mas_is_err(mas)) @@ -2465,13 +2465,13 @@ static inline int mas_split(struct ma_state *mas, int height = 0; unsigned char mid_split; - trace_mas_split(mas); MA_STATE(l_mas, mas->tree, mas->index, mas->last); MA_STATE(r_mas, mas->tree, mas->index, mas->last); MA_STATE(prev_l_mas, mas->tree, mas->index, mas->last); MA_STATE(prev_r_mas, mas->tree, mas->index, mas->last); MA_TOPIARY(mat, mas->tree); + trace_mas_split(mas); // Allocation failures will happen early. mas_node_cnt(mas, 1 + mas->full_cnt * 2); if (mas_is_err(mas)) @@ -2883,11 +2883,11 @@ static inline int mas_spanning_store(struct ma_state *mas, void *entry) struct maple_subtree_state mast; int node_cnt = 0; - trace_mas_spanning_store(mas, entry); // Holds new left and right sub-tree MA_STATE(l_mas, mas->tree, mas->index, mas->index); MA_STATE(r_mas, mas->tree, mas->index, mas->index); + trace_mas_spanning_store(mas); // Leaf nodes if (mas->full_cnt > 0) node_cnt = 1 + mas->full_cnt * 2; // For split upwards. -- 2.50.1