mirror of
https://github.com/torvalds/linux.git
synced 2026-03-14 00:56:20 +01:00
io_uring/zcrx: use folio_nr_pages() instead of shift operation
folio_nr_pages() is a faster helper function to get the number of pages when NR_PAGES_IN_LARGE_FOLIO is enabled. Signed-off-by: Pedro Demarchi Gomes <pedrodemargomes@gmail.com> Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
f0243d2b86
commit
a0169c3a62
1 changed files with 1 additions and 1 deletions
|
|
@ -170,7 +170,7 @@ static unsigned long io_count_account_pages(struct page **pages, unsigned nr_pag
|
|||
if (folio == last_folio)
|
||||
continue;
|
||||
last_folio = folio;
|
||||
res += 1UL << folio_order(folio);
|
||||
res += folio_nr_pages(folio);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue