block: export bio_free_pages to other modules

bio_free_pages is introduced in commit 1dfa0f68c0
("block: add a helper to free bio bounce buffer pages"),
we can reuse the func in other modules after it was
imported.

Cc: Christoph Hellwig <hch@infradead.org>
Cc: Jens Axboe <axboe@fb.com>
Cc: Mike Snitzer <snitzer@redhat.com>
Cc: Shaohua Li <shli@fb.com>
Signed-off-by: Guoqing Jiang <gqjiang@suse.com>
Acked-by: Kent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
This commit is contained in:
Guoqing Jiang
2016-09-22 03:10:01 -04:00
committed by Jens Axboe
parent 1e3aeae4ea
commit 491221f88d
9 changed files with 13 additions and 36 deletions

View File

@@ -145,12 +145,8 @@ static void * r1buf_pool_alloc(gfp_t gfp_flags, void *data)
return r1_bio;
out_free_pages:
while (--j >= 0) {
struct bio_vec *bv;
bio_for_each_segment_all(bv, r1_bio->bios[j], i)
__free_page(bv->bv_page);
}
while (--j >= 0)
bio_free_pages(r1_bio->bios[j]);
out_free_bio:
while (++j < pi->raid_disks)