summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPedro Demarchi Gomes <pedrodemargomes@gmail.com>2025-11-13 10:46:10 +0000
committerJens Axboe <axboe@kernel.dk>2025-11-13 11:19:37 -0700
commita0169c3a62875d1bafa0caffa42e1d1cf6aa40e6 (patch)
tree741681dbd6c223e8a259c999b7a52335500a9240
parentf0243d2b86b97a575a7a013370e934f70ee77dd3 (diff)
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>
-rw-r--r--io_uring/zcrx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/io_uring/zcrx.c b/io_uring/zcrx.c
index 635ee4eb5d8d..149bf9d5b983 100644
--- a/io_uring/zcrx.c
+++ b/io_uring/zcrx.c
@@ -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;
}