diff options
author | Christoph Hellwig | 2018-11-10 09:30:45 +0100 |
---|---|---|
committer | Jens Axboe | 2018-11-10 08:03:46 -0700 |
commit | 49f6613632f9504ae59ccbbb92a5b07f474d75b2 (patch) | |
tree | 785001a296295e8daed9cb746c5126ecdfd9d737 /drivers/block | |
parent | 511c49fe1804671800947b69281e07719fad25e2 (diff) |
nullb: remove leftover legacy request code
null_softirq_done_fn is only used for the blk-mq path, so remove the
other branch. Also rename the function to better match the method name.
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/null_blk_main.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/block/null_blk_main.c b/drivers/block/null_blk_main.c index 9c045bee0985..16ba3db2a015 100644 --- a/drivers/block/null_blk_main.c +++ b/drivers/block/null_blk_main.c @@ -642,14 +642,11 @@ static void null_cmd_end_timer(struct nullb_cmd *cmd) hrtimer_start(&cmd->timer, kt, HRTIMER_MODE_REL); } -static void null_softirq_done_fn(struct request *rq) +static void null_complete_rq(struct request *rq) { struct nullb *nullb = rq->q->queuedata; - if (nullb->dev->queue_mode == NULL_Q_MQ) - end_cmd(blk_mq_rq_to_pdu(rq)); - else - end_cmd(rq->special); + end_cmd(blk_mq_rq_to_pdu(rq)); } static struct nullb_page *null_alloc_page(gfp_t gfp_flags) @@ -1357,7 +1354,7 @@ static blk_status_t null_queue_rq(struct blk_mq_hw_ctx *hctx, static const struct blk_mq_ops null_mq_ops = { .queue_rq = null_queue_rq, - .complete = null_softirq_done_fn, + .complete = null_complete_rq, .timeout = null_timeout_rq, }; |