diff options
author | Christoph Hellwig <hch@lst.de> | 2017-06-16 12:15:20 -0400 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2017-06-18 12:08:55 -0400 |
commit | ea511e3c28c892f689173c91662437c4ddb2ab38 (patch) | |
tree | 0b473ed37ae7f9baed22b4d2f89731bf8c35e4ee /block/blk-mq-sched.c | |
parent | d2c0d3832469b947ca158e8977e66e8e2e64d8dd (diff) |
blk-mq: remove blk_mq_sched_{get,put}_rq_priv
Having these as separate helpers in a header really does not help
readability, or my chances to refactor this code sanely.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-mq-sched.c')
-rw-r--r-- | block/blk-mq-sched.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/block/blk-mq-sched.c b/block/blk-mq-sched.c index 62db188595dc..22601e5c6f19 100644 --- a/block/blk-mq-sched.c +++ b/block/blk-mq-sched.c | |||
@@ -36,6 +36,7 @@ static void __blk_mq_sched_assign_ioc(struct request_queue *q, | |||
36 | struct bio *bio, | 36 | struct bio *bio, |
37 | struct io_context *ioc) | 37 | struct io_context *ioc) |
38 | { | 38 | { |
39 | struct elevator_queue *e = q->elevator; | ||
39 | struct io_cq *icq; | 40 | struct io_cq *icq; |
40 | 41 | ||
41 | spin_lock_irq(q->queue_lock); | 42 | spin_lock_irq(q->queue_lock); |
@@ -49,13 +50,14 @@ static void __blk_mq_sched_assign_ioc(struct request_queue *q, | |||
49 | } | 50 | } |
50 | 51 | ||
51 | rq->elv.icq = icq; | 52 | rq->elv.icq = icq; |
52 | if (!blk_mq_sched_get_rq_priv(q, rq, bio)) { | 53 | if (e && e->type->ops.mq.get_rq_priv && |
53 | rq->rq_flags |= RQF_ELVPRIV; | 54 | e->type->ops.mq.get_rq_priv(q, rq, bio)) { |
54 | get_io_context(icq->ioc); | 55 | rq->elv.icq = NULL; |
55 | return; | 56 | return; |
56 | } | 57 | } |
57 | 58 | ||
58 | rq->elv.icq = NULL; | 59 | rq->rq_flags |= RQF_ELVPRIV; |
60 | get_io_context(icq->ioc); | ||
59 | } | 61 | } |
60 | 62 | ||
61 | void blk_mq_sched_assign_ioc(struct request_queue *q, struct request *rq, | 63 | void blk_mq_sched_assign_ioc(struct request_queue *q, struct request *rq, |