From 7b9e93616399638521aafd1f01dfcf474c736393 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Fri, 16 Jun 2017 18:15:21 +0200 Subject: blk-mq-sched: unify request finished methods No need to have two different callouts of bfq vs kyber. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe --- block/blk-mq.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'block/blk-mq.c') diff --git a/block/blk-mq.c b/block/blk-mq.c index 1a45c287db64..9df7e0394a48 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -437,19 +437,16 @@ void blk_mq_free_request(struct request *rq) struct request_queue *q = rq->q; struct elevator_queue *e = q->elevator; - if (rq->rq_flags & RQF_ELVPRIV) { - if (e && e->type->ops.mq.put_rq_priv) - e->type->ops.mq.put_rq_priv(q, rq); + if (rq->rq_flags & (RQF_ELVPRIV | RQF_QUEUED)) { + if (e && e->type->ops.mq.finish_request) + e->type->ops.mq.finish_request(rq); if (rq->elv.icq) { put_io_context(rq->elv.icq->ioc); rq->elv.icq = NULL; } } - if ((rq->rq_flags & RQF_QUEUED) && e && e->type->ops.mq.put_request) - e->type->ops.mq.put_request(rq); - else - blk_mq_finish_request(rq); + blk_mq_finish_request(rq); } EXPORT_SYMBOL_GPL(blk_mq_free_request); -- cgit v1.2.3-59-g8ed1b