From: Baolin Wang Date: Tue, 26 Aug 2025 09:35:55 +0000 (+0800) Subject: mm: shmem: drop the unnecessary folio_nr_pages() X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=e12b84a40fd23205d6d904e93300e5e4baaa1646;p=users%2Fjedix%2Flinux-maple.git mm: shmem: drop the unnecessary folio_nr_pages() We've got the number of pages in the folio earlier, thus remove the redundant folio_nr_pages() call. Link: https://lkml.kernel.org/r/67c80182ebd949e3894908e01e224697c143aabb.1756200587.git.baolin.wang@linux.alibaba.com Signed-off-by: Baolin Wang Cc: Hugh Dickins Signed-off-by: Andrew Morton --- diff --git a/mm/shmem.c b/mm/shmem.c index b4d4f0e9c40a..640fecc42f60 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