blk-mq: free hctx->ctxs in queue's release handler
blk-mq: free hctx->ctxs in queue's release handler

Now blk_cleanup_queue() can be called before calling
del_gendisk()[1], inside which hctx->ctxs is touched
from blk_mq_unregister_hctx(), but the variable has
been freed by blk_cleanup_queue() at that time.

So this patch moves freeing of hctx->ctxs into queue's
release handler for fixing the oops reported by Stefan.

[1], 6cd18e711dd8075 (block: destroy bdi before blockdev is
unregistered)

Reported-by: Stefan Seyfried <d6a6c4d1e49f12be4ce9e083eb7ac3d10937c619@googlemail.com>
Cc: NeilBrown <1c00aa603bb92d594c03cff60ecf8e63b2a5bcb1@suse.de>
Cc: Christoph Hellwig <923f7720577207a44b32e59bbfbea59d27f1ae8e@lst.de>
Cc: 4fbacc2fa0ffdbb11bf1ad6925b886ebd08dd15f@vger.kernel.org (v4.0)
Signed-off-by: Ming Lei <572efd9047f12626ad5bcb995a452788646858f3@gmail.com>
Signed-off-by: Jens Axboe <cd8c6775e60d6f67a6984377324e5290df3d5358@fb.com>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs