mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-03 19:55:31 +00:00
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>
This commit is contained in:
parent
e9c52d8940
commit
1f41ef12ab
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user