aboutsummaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorVivek Goyal <vgoyal@redhat.com>2011-05-23 04:02:19 -0400
committerJens Axboe <jaxboe@fusionio.com>2011-05-23 04:02:19 -0400
commit2abae55f5a41d29f21b5b259c33d218c950d5c90 (patch)
tree69169fa89fb25fcf7521999d7fca91664262bfc7 /block
parent345227d705f2318e9bc088e79fe71a38bb5fe82b (diff)
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: Vivek Goyal <vgoyal@redhat.com> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'block')
-rw-r--r--block/cfq-iosched.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
index d646b279c8bb..0316f6eece03 100644
--- a/block/cfq-iosched.c
+++ b/block/cfq-iosched.c
@@ -3940,6 +3940,11 @@ static void cfq_exit_queue(struct elevator_queue *e)
3940 */ 3940 */
3941 if (wait) 3941 if (wait)
3942 synchronize_rcu(); 3942 synchronize_rcu();
3943
3944#ifdef CONFIG_CFQ_GROUP_IOSCHED
3945 /* Free up per cpu stats for root group */
3946 free_percpu(cfqd->root_group.blkg.stats_cpu);
3947#endif
3943 kfree(cfqd); 3948 kfree(cfqd);
3944} 3949}
3945 3950