diff options
author | Christoph Hellwig <hch@lst.de> | 2021-06-02 09:53:17 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-06-11 11:53:02 -0600 |
commit | 26a9750aa875126e4b7fc5ee6de652a529c5b7ee (patch) | |
tree | 481f3adfb8068b423203091f4298f260c215473c /drivers | |
parent | cdb14e0f7775e767484843e8ecd736bb21754c58 (diff) | |
download | linux-stable-26a9750aa875126e4b7fc5ee6de652a529c5b7ee.tar.gz linux-stable-26a9750aa875126e4b7fc5ee6de652a529c5b7ee.tar.bz2 linux-stable-26a9750aa875126e4b7fc5ee6de652a529c5b7ee.zip |
blk-mq: improve the blk_mq_init_allocated_queue interface
Don't return the passed in request_queue but a normal error code, and
drop the elevator_init argument in favor of just calling elevator_init_mq
directly from dm-rq.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Link: https://lore.kernel.org/r/20210602065345.355274-3-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/md/dm-rq.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/md/dm-rq.c b/drivers/md/dm-rq.c index 9c3bc3711b33..0dbd48cbdff9 100644 --- a/drivers/md/dm-rq.c +++ b/drivers/md/dm-rq.c @@ -530,7 +530,6 @@ static const struct blk_mq_ops dm_mq_ops = { int dm_mq_init_request_queue(struct mapped_device *md, struct dm_table *t) { - struct request_queue *q; struct dm_target *immutable_tgt; int err; @@ -557,12 +556,10 @@ int dm_mq_init_request_queue(struct mapped_device *md, struct dm_table *t) if (err) goto out_kfree_tag_set; - q = blk_mq_init_allocated_queue(md->tag_set, md->queue, true); - if (IS_ERR(q)) { - err = PTR_ERR(q); + err = blk_mq_init_allocated_queue(md->tag_set, md->queue); + if (err) goto out_tag_set; - } - + elevator_init_mq(md->queue); return 0; out_tag_set: |