Ming Lei 518d00b749 block: null_blk: fix queue leak inside removing device
When queue_mode is NULL_Q_MQ and null_blk is being removed,
blk_cleanup_queue() isn't called to cleanup queue, so the queue
allocated won't be freed.

This patch calls blk_cleanup_queue() for MQ to drain all pending
requests first and release the reference counter of queue kobject, then
blk_mq_free_queue() will be called in queue kobject's release handler
when queue kobject's reference counter drops to zero.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-01-12 16:22:42 +07:00
..
2013-04-09 14:13:19 -04:00
2011-08-08 11:40:15 +02:00
2013-04-09 14:13:32 -04:00
2013-10-25 11:55:59 +01:00
2012-03-28 18:30:03 +01:00
2013-06-29 12:46:45 +04:00
2013-07-03 16:08:05 -07:00
2013-04-09 14:13:32 -04:00
2013-11-08 09:10:30 -07:00
2009-03-26 21:15:27 +01:00