From 9218800076ec9257ed006f8d7edf802acc810319 Mon Sep 17 00:00:00 2001 From: Kefeng Wang Date: Fri, 17 Jul 2026 17:13:45 +0800 Subject: [PATCH] mm: mincore: remove xa_is_value() in mincore_swap() The swap_cache_get_folio() no longer returns shadow entries, so the xa_is_value() check is unnecessary. Link: https://lore.kernel.org/20260717091347.1144789-5-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Reviewed-by: Pedro Falcato Acked-by: David Hildenbrand (Arm) Cc: Jann Horn Cc: Liam R. Howlett Cc: Lorenzo Stoakes Cc: Vlastimil Babka Cc: Zi Yan Signed-off-by: Andrew Morton --- mm/mincore.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mm/mincore.c b/mm/mincore.c index a2119c50c50c..16059ed47711 100644 --- a/mm/mincore.c +++ b/mm/mincore.c @@ -91,8 +91,7 @@ static unsigned char mincore_swap(swp_entry_t entry, bool shmem) folio = swap_cache_get_folio(entry); if (shmem) put_swap_device(si); - /* The swap cache space contains either folio, shadow or NULL */ - if (folio && !xa_is_value(folio)) { + if (folio) { present = folio_test_uptodate(folio); folio_put(folio); }