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: <aa3500f8-9a58-458b-96aa-5350c217847e@linux.alibaba.com>
Date: Wed, 14 May 2025 17:31:56 +0800
From: Baolin Wang <baolin.wang@...ux.alibaba.com>
To: Kemeng Shi <shikemeng@...weicloud.com>, hughd@...gle.com,
 akpm@...ux-foundation.org
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 5/5] mm/shmem: remove unneeded xa_is_value() check in
 shmem_unuse_swap_entries()



On 2025/5/15 00:50, Kemeng Shi wrote:
> As only value entry will be added to fbatch in shmem_find_swap_entries(),
> there is no need to do xa_is_value() check in shmem_unuse_swap_entries().
> 
> Signed-off-by: Kemeng Shi <shikemeng@...weicloud.com>

LGTM.
Reviewed-by: Baolin Wang <baolin.wang@...ux.alibaba.com>

> ---
>   mm/shmem.c | 2 --
>   1 file changed, 2 deletions(-)
> 
> diff --git a/mm/shmem.c b/mm/shmem.c
> index dfd2f730833c..f1d45fcff5e8 100644
> --- a/mm/shmem.c
> +++ b/mm/shmem.c
> @@ -1446,8 +1446,6 @@ static int shmem_unuse_swap_entries(struct inode *inode,
>   	for (i = 0; i < folio_batch_count(fbatch); i++) {
>   		struct folio *folio = fbatch->folios[i];
>   
> -		if (!xa_is_value(folio))
> -			continue;
>   		error = shmem_swapin_folio(inode, indices[i], &folio, SGP_CACHE,
>   					mapping_gfp_mask(mapping), NULL, NULL);
>   		if (error == 0) {

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ