> + folio = page_folio(page); > + > + if (!folio_test_large(folio) || > + (bio_op(bio) == REQ_OP_ZONE_APPEND)) { I don't understand why you need this branch. All the arithmetics below should also work just fine for non-large folios, and there while the same_page logic in bio_iov_add_zone_append_page probably needs to be folio-ized first, it should be handled the same way here as well. bio_iov_add_page should also be moved to take a folio before the (otherwise nice) changes here. and of course in the long run we really need a folio version of pin_user_pages and iov_iter_extract_pages.