提交 037cebb8 编写于 作者: C Christoph Hellwig 提交者: Jens Axboe

blk-mq: streamline blk_mq_get_request

Signed-off-by: NChristoph Hellwig <hch@lst.de>
Signed-off-by: NJens Axboe <axboe@kernel.dk>
上级 6af54051
......@@ -302,24 +302,24 @@ static struct request *blk_mq_get_request(struct request_queue *q,
rq = e->type->ops.mq.get_request(q, op, data);
if (rq)
rq->rq_flags |= RQF_QUEUED;
} else
rq = __blk_mq_alloc_request(data, op);
} else {
rq = __blk_mq_alloc_request(data, op);
goto allocated;
}
}
if (rq) {
if (!op_is_flush(op)) {
rq->elv.icq = NULL;
if (e && e->type->icq_cache)
blk_mq_sched_assign_ioc(q, rq, bio);
}
data->hctx->queued++;
return rq;
rq = __blk_mq_alloc_request(data, op);
allocated:
if (!rq) {
blk_queue_exit(q);
return NULL;
}
blk_queue_exit(q);
return NULL;
if (!op_is_flush(op)) {
rq->elv.icq = NULL;
if (e && e->type->icq_cache)
blk_mq_sched_assign_ioc(q, rq, bio);
}
data->hctx->queued++;
return rq;
}
struct request *blk_mq_alloc_request(struct request_queue *q, int rw,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册