aboutsummaryrefslogtreecommitdiffstats
path: root/block/blk-mq.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2017-06-16 18:15:21 +0200
committerJens Axboe <axboe@kernel.dk>2017-06-18 10:08:55 -0600
commit7b9e93616399638521aafd1f01dfcf474c736393 (patch)
treeb135a4bc68b8c8a8325ae8a0634686f0ddb7f0f8 /block/blk-mq.c
parentblk-mq: remove blk_mq_sched_{get,put}_rq_priv (diff)
downloadlinux-dev-7b9e93616399638521aafd1f01dfcf474c736393.tar.xz
linux-dev-7b9e93616399638521aafd1f01dfcf474c736393.zip
blk-mq-sched: unify request finished methods
No need to have two different callouts of bfq vs kyber. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-mq.c')
-rw-r--r--block/blk-mq.c11
1 files changed, 4 insertions, 7 deletions
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);