]> www.infradead.org Git - users/hch/misc.git/commit
block: share more code for bio addition helpers
authorChristoph Hellwig <hch@lst.de>
Sat, 19 Oct 2024 11:27:50 +0000 (13:27 +0200)
committerChristoph Hellwig <hch@lst.de>
Wed, 23 Oct 2024 16:45:24 +0000 (18:45 +0200)
commita74c7e21bbe4221039775f68f6e36d2e505baab5
treed42d51c78102bc4eebd59128597df584b28b1d32
parent8d8a64b97d818a09942df11cdc2bb903e5532cc3
block: share more code for bio addition helpers

__bio_iov_iter_get_pages currently open codes adding pages to the bio,
which duplicates a lot of code from bio_add_page and
bio_add_zone_append_page.  Add bio_add_page_int and
bio_add_zone_append_page_int helpers that pass down the same_page
output argument so that __bio_iov_iter_get_pages can reuse the main
add bio to page helpers.

Note that I'd normally call these helpers __bio_add_page and
__bio_add_zone_append_page, but the former is already taken for an
exported API.

Signed-off-by: Christoph Hellwig <hch@lst.de>
block/bio.c