block: introduce blk_init_flush and its pair

These two temporary functions are introduced for holding flush
initialization and de-initialization, so that we can
introduce 'flush queue' easier in the following patch. And
once 'flush queue' and its allocation/free functions are ready,
they will be removed for sake of code readability.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
This commit is contained in:
Ming Lei
2014-09-25 23:23:40 +08:00
committed by Jens Axboe
parent 1bcb1eada4
commit f355265571
6 changed files with 26 additions and 8 deletions

View File

@@ -517,11 +517,11 @@ static void blk_release_queue(struct kobject *kobj)
if (q->queue_tags)
__blk_queue_free_tags(q);
blk_exit_flush(q);
if (q->mq_ops)
blk_mq_free_queue(q);
kfree(q->flush_rq);
blk_trace_shutdown(q);
bdi_destroy(&q->backing_dev_info);