summaryrefslogtreecommitdiff
path: root/drivers/md/bcache/debug.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.com>2017-06-18 07:38:59 +0300
committerJens Axboe <axboe@kernel.dk>2017-06-18 21:40:59 +0300
commit5a136fdf5a0ab3c021ef6d989bb56a361e132234 (patch)
treedca47cf7c7b3baeaf1e47257bc14b3e2b3935d69 /drivers/md/bcache/debug.c
parent4559fa55193f71d715319b841f8613d8442283d6 (diff)
downloadlinux-5a136fdf5a0ab3c021ef6d989bb56a361e132234.tar.xz
bcache: use kmalloc to allocate bio in bch_data_verify()
This function allocates a bio, then a collection of pages. It copes with failure. It currently uses a mempool() to allocate the bio, but alloc_page() to allocate the pages. These fail in different ways, so the usage is inconsistent. Change the bio_clone() to bio_clone_kmalloc() so that no pool is used either for the bio or the pages. Reviewed-by: Christoph Hellwig <hch@lst.de> Acked-by: Kent Overstreet <kent.overstreet@gmail.com> Reviewed-by : Ming Lei <ming.lei@redhat.com> Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/md/bcache/debug.c')
-rw-r--r--drivers/md/bcache/debug.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/bcache/debug.c b/drivers/md/bcache/debug.c
index 06f55056aaae..35a5a7210e51 100644
--- a/drivers/md/bcache/debug.c
+++ b/drivers/md/bcache/debug.c
@@ -110,7 +110,7 @@ void bch_data_verify(struct cached_dev *dc, struct bio *bio)
struct bio_vec bv, cbv;
struct bvec_iter iter, citer = { 0 };
- check = bio_clone(bio, GFP_NOIO);
+ check = bio_clone_kmalloc(bio, GFP_NOIO);
if (!check)
return;
check->bi_opf = REQ_OP_READ;