提交 2abae55f 编写于 作者: V Vivek Goyal 提交者: Jens Axboe

cfq-iosched: Fix a memory leak of per cpu stats for root group

We allocated per cpu stats struct for root group but did not free it.
Fix it.
Signed-off-by: NVivek Goyal <vgoyal@redhat.com>
Signed-off-by: NJens Axboe <jaxboe@fusionio.com>
上级 345227d7
......@@ -3940,6 +3940,11 @@ static void cfq_exit_queue(struct elevator_queue *e)
*/
if (wait)
synchronize_rcu();
#ifdef CONFIG_CFQ_GROUP_IOSCHED
/* Free up per cpu stats for root group */
free_percpu(cfqd->root_group.blkg.stats_cpu);
#endif
kfree(cfqd);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册