summaryrefslogtreecommitdiff
path: root/block/blk-mq.c
diff options
context:
space:
mode:
authorOmar Sandoval <osandov@fb.com>2017-03-28 16:12:16 -0700
committerJens Axboe <axboe@fb.com>2017-03-29 08:09:08 -0600
commit0c9539a431bd4e4cbe475eb17e587f3ac06f2ae2 (patch)
tree595c0c1f5bf4e4593e91643d2123717dc7c349ef /block/blk-mq.c
parent334335d2f7a077a5ff561d86b0ad43bedd83ca05 (diff)
blk-mq: fix leak of q->stats
blk_alloc_queue_node() already allocates q->stats, so blk_mq_init_allocated_queue() is overwriting it with a new allocation. Fixes: a83b576c9c25 ("block: fix stacked driver stats init and free") Reviewed-by: Ming Lei <tom.leiming@gmail.com> Signed-off-by: Omar Sandoval <osandov@fb.com> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block/blk-mq.c')
-rw-r--r--block/blk-mq.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c
index 0ed00eca4d5a..182776877a55 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -2234,10 +2234,6 @@ struct request_queue *blk_mq_init_allocated_queue(struct blk_mq_tag_set *set,
/* mark the queue as mq asap */
q->mq_ops = set->ops;
- q->stats = blk_alloc_queue_stats();
- if (!q->stats)
- goto err_exit;
-
q->poll_cb = blk_stat_alloc_callback(blk_mq_poll_stats_fn,
blk_stat_rq_ddir, 2, q);
if (!q->poll_cb)