mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-03-28 10:18:25 +08:00
blk-mq: move update of tags->rqs to __blk_mq_alloc_request()
No functional difference, it just makes a little more sense to update the tag map where we actually allocate the tag. Signed-off-by: Omar Sandoval <osandov@fb.com> Signed-off-by: Jens Axboe <axboe@fb.com> Tested-by: Sagi Grimberg <sagi@grimberg.me>
This commit is contained in:
committed by
Jens Axboe
parent
5974839899
commit
562bef4259
@@ -134,8 +134,6 @@ struct request *blk_mq_sched_get_request(struct request_queue *q,
|
||||
rq = __blk_mq_alloc_request(data, op);
|
||||
} else {
|
||||
rq = __blk_mq_alloc_request(data, op);
|
||||
if (rq)
|
||||
data->hctx->tags->rqs[rq->tag] = rq;
|
||||
}
|
||||
|
||||
if (rq) {
|
||||
|
||||
@@ -234,6 +234,7 @@ struct request *__blk_mq_alloc_request(struct blk_mq_alloc_data *data,
|
||||
}
|
||||
rq->tag = tag;
|
||||
rq->internal_tag = -1;
|
||||
data->hctx->tags->rqs[rq->tag] = rq;
|
||||
}
|
||||
|
||||
blk_mq_rq_ctx_init(data->q, data->ctx, rq, op);
|
||||
|
||||
Reference in New Issue
Block a user