diff options
Diffstat (limited to 'block/blk-mq.c')
-rw-r--r-- | block/blk-mq.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c index 2f95747c287e..9ee3b87c4498 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c | |||
@@ -1641,10 +1641,8 @@ static void blk_mq_free_hw_queues(struct request_queue *q, | |||
1641 | struct blk_mq_hw_ctx *hctx; | 1641 | struct blk_mq_hw_ctx *hctx; |
1642 | unsigned int i; | 1642 | unsigned int i; |
1643 | 1643 | ||
1644 | queue_for_each_hw_ctx(q, hctx, i) { | 1644 | queue_for_each_hw_ctx(q, hctx, i) |
1645 | free_cpumask_var(hctx->cpumask); | 1645 | free_cpumask_var(hctx->cpumask); |
1646 | kfree(hctx); | ||
1647 | } | ||
1648 | } | 1646 | } |
1649 | 1647 | ||
1650 | static int blk_mq_init_hctx(struct request_queue *q, | 1648 | static int blk_mq_init_hctx(struct request_queue *q, |
@@ -2002,11 +2000,9 @@ void blk_mq_free_queue(struct request_queue *q) | |||
2002 | 2000 | ||
2003 | percpu_ref_exit(&q->mq_usage_counter); | 2001 | percpu_ref_exit(&q->mq_usage_counter); |
2004 | 2002 | ||
2005 | free_percpu(q->queue_ctx); | ||
2006 | kfree(q->queue_hw_ctx); | 2003 | kfree(q->queue_hw_ctx); |
2007 | kfree(q->mq_map); | 2004 | kfree(q->mq_map); |
2008 | 2005 | ||
2009 | q->queue_ctx = NULL; | ||
2010 | q->queue_hw_ctx = NULL; | 2006 | q->queue_hw_ctx = NULL; |
2011 | q->mq_map = NULL; | 2007 | q->mq_map = NULL; |
2012 | 2008 | ||