Skip to content

Commit c5a9dea

Browse files
Kemeng Shiakpm00
authored andcommitted
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>
1 parent a5cdbe9 commit c5a9dea

1 file changed

Lines changed: 0 additions & 2 deletions

File tree

mm/shmem.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1446,8 +1446,6 @@ static int shmem_unuse_swap_entries(struct inode *inode,
14461446
for (i = 0; i < folio_batch_count(fbatch); i++) {
14471447
struct folio *folio = fbatch->folios[i];
14481448

1449-
if (!xa_is_value(folio))
1450-
continue;
14511449
error = shmem_swapin_folio(inode, indices[i], &folio, SGP_CACHE,
14521450
mapping_gfp_mask(mapping), NULL, NULL);
14531451
if (error == 0) {

0 commit comments

Comments
 (0)