diff options
author | Guoqing Jiang <gqjiang@suse.com> | 2016-09-22 10:10:01 +0300 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2016-09-22 16:48:03 +0300 |
commit | 491221f88d00651e449c9caf7415b6453c8a77b7 (patch) | |
tree | 8021285e1ee5eaff42fa4a5a00929ad36dad7633 /drivers/md/bcache/debug.c | |
parent | 1e3aeae4ea710023dda2a6b780183ee371d1a796 (diff) | |
download | linux-491221f88d00651e449c9caf7415b6453c8a77b7.tar.xz |
block: export bio_free_pages to other modules
bio_free_pages is introduced in commit 1dfa0f68c040
("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>
Diffstat (limited to 'drivers/md/bcache/debug.c')
-rw-r--r-- | drivers/md/bcache/debug.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/md/bcache/debug.c b/drivers/md/bcache/debug.c index c28df164701e..333a1e5f6ae6 100644 --- a/drivers/md/bcache/debug.c +++ b/drivers/md/bcache/debug.c @@ -107,9 +107,8 @@ void bch_data_verify(struct cached_dev *dc, struct bio *bio) { char name[BDEVNAME_SIZE]; struct bio *check; - struct bio_vec bv, *bv2; + struct bio_vec bv; struct bvec_iter iter; - int i; check = bio_clone(bio, GFP_NOIO); if (!check) @@ -136,8 +135,7 @@ void bch_data_verify(struct cached_dev *dc, struct bio *bio) kunmap_atomic(p1); } - bio_for_each_segment_all(bv2, check, i) - __free_page(bv2->bv_page); + bio_free_pages(check); out_put: bio_put(check); } |