mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-04 20:19:47 +08:00
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>
This commit is contained in:
parent
188cb385bb
commit
c809579374
@ -649,7 +649,7 @@ void page_cache_async_ra(struct readahead_control *ractl,
|
||||
* Ramp up sizes, and push forward the readahead window.
|
||||
*/
|
||||
expected = round_down(ra->start + ra->size - ra->async_size,
|
||||
1UL << folio_order(folio));
|
||||
folio_nr_pages(folio));
|
||||
if (index == expected) {
|
||||
ra->start += ra->size;
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user