dm-crypt: use folio_nr_pages() instead of shift operation
PATCH 1/1 dm-crypt: 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 <[email protected]>
--- drivers/md/dm-crypt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/md/dm-crypt.c +1 -1
@@ -1781,7 +1781,7 @@ static void crypt_free_buffer_pages(struct crypt_config *cc, struct bio *clone)bio_for_each_folio_all (fi, clone) {if (folio_test_large (fi.folio)) {percpu_counter_sub (&cc->n_allocated_pages, -1 <<folio_order (fi.folio)); +folio_nr_pages (fi.folio));folio_put (fi.folio); }else {mempool_free (&fi.folio->page, &cc->page_pool);
Signature · 1 line
2.39.5