Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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().

Link: https://lkml.kernel.org/r/20250516170939.965736-6-shikemeng@huaweicloud.com
Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com>
Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Kairui Song <kasong@tencent.com>
Cc: kernel test robot <oliver.sang@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Kemeng Shi and committed by
Andrew Morton
c5a9deac a5cdbe9f

-2
-2
mm/shmem.c
··· 1446 1446 for (i = 0; i < folio_batch_count(fbatch); i++) { 1447 1447 struct folio *folio = fbatch->folios[i]; 1448 1448 1449 - if (!xa_is_value(folio)) 1450 - continue; 1451 1449 error = shmem_swapin_folio(inode, indices[i], &folio, SGP_CACHE, 1452 1450 mapping_gfp_mask(mapping), NULL, NULL); 1453 1451 if (error == 0) {