Commit 2abae55f authored by Vivek Goyal's avatar Vivek Goyal Committed by 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: default avatarVivek Goyal <vgoyal@redhat.com>
Signed-off-by: default avatarJens Axboe <jaxboe@fusionio.com>
parent 345227d7
...@@ -3940,6 +3940,11 @@ static void cfq_exit_queue(struct elevator_queue *e) ...@@ -3940,6 +3940,11 @@ static void cfq_exit_queue(struct elevator_queue *e)
*/ */
if (wait) if (wait)
synchronize_rcu(); 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); kfree(cfqd);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment