summaryrefslogtreecommitdiff
path: root/block/blk-core.c
diff options
context:
space:
mode:
authorShaohua Li <shli@fb.com>2017-10-06 17:56:00 -0700
committerJens Axboe <axboe@kernel.dk>2017-10-10 13:48:16 -0600
commit85acb3ba2f925a0ec6928c1967c3adefa00682f4 (patch)
tree8f33cf0708140ea17e4fa3d3fc31aadfd1867b0e /block/blk-core.c
parenteca8b53a6769e60d6d8240d71202d73b0af81901 (diff)
block: set request_list for request
Legacy queue sets request's request_list, mq doesn't. This makes mq does the same thing, so we can find cgroup of a request. Note, we really only use blkg field of request_list, it's pointless to allocate mempool for request_list in mq case. Signed-off-by: Shaohua Li <shli@fb.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-core.c')
-rw-r--r--block/blk-core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/blk-core.c b/block/blk-core.c
index 14f7674fa0b1..e8e149ccc86b 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -718,7 +718,7 @@ static void free_request_size(void *element, void *data)
int blk_init_rl(struct request_list *rl, struct request_queue *q,
gfp_t gfp_mask)
{
- if (unlikely(rl->rq_pool))
+ if (unlikely(rl->rq_pool) || q->mq_ops)
return 0;
rl->q = q;