summaryrefslogtreecommitdiffstats
path: root/drivers/md/bcache/debug.c
diff options
context:
space:
mode:
authorGuoqing Jiang2016-09-22 09:10:01 +0200
committerJens Axboe2016-09-22 15:48:03 +0200
commit491221f88d00651e449c9caf7415b6453c8a77b7 (patch)
tree8021285e1ee5eaff42fa4a5a00929ad36dad7633 /drivers/md/bcache/debug.c
parentlightnvm: propagate device_add() error code (diff)
downloadkernel-qcow2-linux-491221f88d00651e449c9caf7415b6453c8a77b7.tar.gz
kernel-qcow2-linux-491221f88d00651e449c9caf7415b6453c8a77b7.tar.xz
kernel-qcow2-linux-491221f88d00651e449c9caf7415b6453c8a77b7.zip
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.c6
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);
}