mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 12:11:40 +00:00
maple_tree: remove unnecessary check from mas_destroy()
mas_destroy currently checks if mas->node is MAS_START prior to calling mas_start(), but this is unnecessary as mas_start() will do nothing if the node is anything but MAS_START. Link: https://lkml.kernel.org/r/20230518145544.1722059-21-Liam.Howlett@oracle.com Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com> Reviewed-by: Peng Zhang <zhangpeng.00@bytedance.com> Cc: David Binderman <dcb314@hotmail.com> Cc: Sergey Senozhatsky <senozhatsky@chromium.org> Cc: Vernon Yang <vernon2gm@gmail.com> Cc: Wei Yang <richard.weiyang@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
parent
eaf9790d3b
commit
23e734ecd9
@ -5811,9 +5811,7 @@ void mas_destroy(struct ma_state *mas)
|
||||
if (mas->mas_flags & MA_STATE_REBALANCE) {
|
||||
unsigned char end;
|
||||
|
||||
if (mas_is_start(mas))
|
||||
mas_start(mas);
|
||||
|
||||
mas_start(mas);
|
||||
mtree_range_walk(mas);
|
||||
end = mas_data_end(mas) + 1;
|
||||
if (end < mt_min_slot_count(mas->node) - 1)
|
||||
|
Loading…
Reference in New Issue
Block a user