We've got the number of pages in the folio earlier, thus remove the redundant folio_nr_pages() function. Signed-off-by: Baolin Wang --- mm/shmem.c | 1 - 1 file changed, 1 deletion(-) diff --git a/mm/shmem.c b/mm/shmem.c index b3c6de84dd27..f45292bac32d 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -2430,7 +2430,6 @@ static int shmem_swapin_folio(struct inode *inode, pgoff_t index, goto failed; } folio_wait_writeback(folio); - nr_pages = folio_nr_pages(folio); /* * Some architectures may have to restore extra metadata to the -- 2.43.5