blk-mq: fix leak of q->stats
authorOmar Sandoval <osandov@fb.com>
Tue, 28 Mar 2017 23:12:16 +0000 (16:12 -0700)
committerJens Axboe <axboe@fb.com>
Wed, 29 Mar 2017 14:09:08 +0000 (08:09 -0600)
commit0c9539a431bd4e4cbe475eb17e587f3ac06f2ae2
tree595c0c1f5bf4e4593e91643d2123717dc7c349ef
parent334335d2f7a077a5ff561d86b0ad43bedd83ca05
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>
block/blk-mq.c