Skip to content

Commit

Permalink
maple_tree: use cached node end in mas_destroy()
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
howlett authored and akpm00 committed Dec 12, 2023
1 parent e9c52d8 commit 1f41ef1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/maple_tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 1f41ef1

Please sign in to comment.