lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0201ec78-5b43-40e1-c1a0-4891f47206dc@bytedance.com>
Date:   Wed, 26 Apr 2023 17:59:08 +0800
From:   Peng Zhang <zhangpeng.00@...edance.com>
To:     "Liam R. Howlett" <Liam.Howlett@...cle.com>
Cc:     linux-kernel@...r.kernel.org, linux-mm@...ck.org,
        maple-tree@...ts.infradead.org,
        Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH 20/34] maple_tree: Remove unnecessary check from
 mas_destroy()


在 2023/4/25 22:09, Liam R. Howlett 写道:
> 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.
>
> Signed-off-by: Liam R. Howlett <Liam.Howlett@...cle.com>
Reviewed-by: Peng Zhang <zhangpeng.00@...edance.com>
> ---
>   lib/maple_tree.c | 4 +---
>   1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/lib/maple_tree.c b/lib/maple_tree.c
> index 89e30462f8b62..35c6e12ca9482 100644
> --- a/lib/maple_tree.c
> +++ b/lib/maple_tree.c
> @@ -5817,9 +5817,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)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ