diff options
author | Liam R. Howlett <Liam.Howlett@oracle.com> | 2023-05-18 10:55:29 -0400 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2023-06-09 16:25:32 -0700 |
commit | 23e734ecd97fb0dec1537960040e7ef0d5ef7ae6 (patch) | |
tree | 69c326b73f9defc06ded7a4f759c3dc58bb64473 /lib/maple_tree.c | |
parent | eaf9790d3bc6e157a2134c01c7d707a5a712fab1 (diff) | |
download | lwn-23e734ecd97fb0dec1537960040e7ef0d5ef7ae6.tar.gz lwn-23e734ecd97fb0dec1537960040e7ef0d5ef7ae6.zip |
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>
Diffstat (limited to 'lib/maple_tree.c')
-rw-r--r-- | lib/maple_tree.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/maple_tree.c b/lib/maple_tree.c index d35a2945164e..136aab920f95 100644 --- a/lib/maple_tree.c +++ b/lib/maple_tree.c @@ -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) |