aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLiam R. Howlett <[email protected]>2023-11-01 13:16:23 -0400
committerAndrew Morton <[email protected]>2023-12-12 10:56:58 -0800
commit1f41ef12abf8538b3d82cdae14c06aa171cb71ce (patch)
treef7981c7bed993e21209f5a03828d55dd0bb2122f
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/[email protected] Signed-off-by: Liam R. Howlett <[email protected]> Cc: Peng Zhang <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
-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);