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 <wangkefeng.wang@huawei.com>
Reviewed-by: Pedro Falcato <pfalcato@suse.de>
Acked-by: David Hildenbrand (Arm) <david@kernel.org>
Cc: Jann Horn <jannh@google.com>
Cc: Liam R. Howlett <liam@infradead.org>
Cc: Lorenzo Stoakes <ljs@kernel.org>
Cc: Vlastimil Babka <vbabka@kernel.org>
Cc: Zi Yan <ziy@nvidia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
Kefeng Wang 2026-07-17 17:13:45 +08:00 committed by Andrew Morton
parent 7625cb5673
commit 9218800076

View File

@ -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);
}