[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20250516170939.965736-6-shikemeng@huaweicloud.com>
Date: Sat, 17 May 2025 01:09:39 +0800
From: Kemeng Shi <shikemeng@...weicloud.com>
To: hughd@...gle.com,
baolin.wang@...ux.alibaba.com,
akpm@...ux-foundation.org
Cc: ryncsn@...il.com,
linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: [PATCH v3 5/5] mm/shmem: remove unneeded xa_is_value() check in shmem_unuse_swap_entries()
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>
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 07b8e1400c67..4b42419ce6b2 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) {
--
2.30.0
Powered by blists - more mailing lists