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/[email protected] Signed-off-by: Kemeng Shi <[email protected]> Reviewed-by: Baolin Wang <[email protected]> Cc: Hugh Dickins <[email protected]> Cc: Kairui Song <[email protected]> Cc: kernel test robot <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent a5cdbe9 commit c5a9dea

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

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)