readahead: use folio_nr_pages() instead of shift operation
authorChi Zhiling <chizhiling@kylinos.cn>
Thu, 10 Jul 2025 06:04:51 +0000 (14:04 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Sun, 20 Jul 2025 01:59:53 +0000 (18:59 -0700)
commitc809579374f47c8273eaf22a40674ae547f39254
tree89565b1fbbb77f3f7036a21541e7715cb78099ca
parent188cb385bbf04d486df3e52f28c47b3961f5f0c0
readahead: use folio_nr_pages() instead of shift operation

folio_nr_pages() is faster helper function to get the number of pages when
NR_PAGES_IN_LARGE_FOLIO is enabled.

Link: https://lkml.kernel.org/r/20250710060451.3535957-1-chizhiling@163.com
Signed-off-by: Chi Zhiling <chizhiling@kylinos.cn>
Acked-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Ryan Roberts <ryan.roberts@arm.com>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/readahead.c