summaryrefslogtreecommitdiff
path: root/lib/maple_tree.c
diff options
context:
space:
mode:
authorLiam R. Howlett <Liam.Howlett@oracle.com>2023-11-01 13:16:23 -0400
committerAndrew Morton <akpm@linux-foundation.org>2023-12-12 10:56:58 -0800
commit1f41ef12abf8538b3d82cdae14c06aa171cb71ce (patch)
treef7981c7bed993e21209f5a03828d55dd0bb2122f /lib/maple_tree.c
parente9c52d8940cbfd94b36035bbebce7f55954e7728 (diff)
maple_tree: use cached node end in mas_destroy()
The node end is set during the walk, so use the resulting end instead of re-fetching it. Link: https://lkml.kernel.org/r/20231101171629.3612299-7-Liam.Howlett@oracle.com Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com> Cc: Peng Zhang <zhangpeng.00@bytedance.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'lib/maple_tree.c')
-rw-r--r--lib/maple_tree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/maple_tree.c b/lib/maple_tree.c
index 1e617be77dfb..216f54177151 100644
--- a/lib/maple_tree.c
+++ b/lib/maple_tree.c
@@ -5576,7 +5576,7 @@ void mas_destroy(struct ma_state *mas)
mas_start(mas);
mtree_range_walk(mas);
- end = mas_data_end(mas) + 1;
+ end = mas->end + 1;
if (end < mt_min_slot_count(mas->node) - 1)
mas_destroy_rebalance(mas, end);