From 338aa96d5661048b3c0cafc6d91876025603cacf Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Sun, 20 May 2018 18:25:47 -0400 Subject: block: convert bounce, q->bio_split to bioset_init()/mempool_init() Convert the core block functionality to embedded bio sets. Reviewed-by: Christoph Hellwig Signed-off-by: Kent Overstreet Signed-off-by: Jens Axboe --- block/blk-core.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'block/blk-core.c') diff --git a/block/blk-core.c b/block/blk-core.c index cee03cad99f2..a295b3c159b2 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -992,6 +992,7 @@ struct request_queue *blk_alloc_queue_node(gfp_t gfp_mask, int node_id, spinlock_t *lock) { struct request_queue *q; + int ret; q = kmem_cache_alloc_node(blk_requestq_cachep, gfp_mask | __GFP_ZERO, node_id); @@ -1002,8 +1003,8 @@ struct request_queue *blk_alloc_queue_node(gfp_t gfp_mask, int node_id, if (q->id < 0) goto fail_q; - q->bio_split = bioset_create(BIO_POOL_SIZE, 0, BIOSET_NEED_BVECS); - if (!q->bio_split) + ret = bioset_init(&q->bio_split, BIO_POOL_SIZE, 0, BIOSET_NEED_BVECS); + if (ret) goto fail_id; q->backing_dev_info = bdi_alloc_node(gfp_mask, node_id); @@ -1075,7 +1076,7 @@ fail_bdi: fail_stats: bdi_put(q->backing_dev_info); fail_split: - bioset_free(q->bio_split); + bioset_exit(&q->bio_split); fail_id: ida_simple_remove(&blk_queue_ida, q->id); fail_q: -- cgit v1.2.3