Weiping Zhang 2e194422f1 block: free both rq_map and request
Allocation:

__blk_mq_alloc_rq_map
	blk_mq_alloc_rq_map
		blk_mq_alloc_rq_map
			tags = blk_mq_init_tags : kzalloc_node:
			tags->rqs = kcalloc_node
			tags->static_rqs = kcalloc_node
	blk_mq_alloc_rqs
		p = alloc_pages_node
		tags->static_rqs[i] = p + offset;

Free:

blk_mq_free_rq_map
	kfree(tags->rqs);
	kfree(tags->static_rqs);
	blk_mq_free_tags
		kfree(tags);

The page allocated in blk_mq_alloc_rqs cannot be released,
so we should use blk_mq_free_map_and_requests here.

blk_mq_free_map_and_requests
	blk_mq_free_rqs
		__free_pages : cleanup for blk_mq_alloc_rqs
	blk_mq_free_rq_map : cleanup for blk_mq_alloc_rq_map

Signed-off-by: Weiping Zhang <zhangweiping@didiglobal.com>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-05-09 16:15:12 -06:00
..
2020-03-27 12:04:34 -06:00
2020-04-29 09:33:26 -06:00
2020-04-22 10:47:06 -06:00
2020-04-22 10:47:06 -06:00
2020-03-17 20:55:21 +01:00
2020-05-09 16:15:12 -06:00
2019-10-07 21:19:10 -06:00
2020-03-30 11:43:51 -07:00
2020-04-25 09:44:40 -06:00
2020-01-03 09:33:21 +01:00
2020-04-20 11:32:59 -06:00
2019-07-15 09:20:27 -03:00
2020-01-06 20:59:04 -07:00