aboutsummaryrefslogtreecommitdiffstats
path: root/block/blk-cgroup.c
diff options
context:
space:
mode:
authorVivek Goyal <vgoyal@redhat.com>2011-10-25 09:48:12 -0400
committerJens Axboe <axboe@kernel.dk>2011-10-25 09:48:12 -0400
commite060f00beee23568fe2c4faf1e88ff22edefd7b2 (patch)
treea953ca37996c2010c4e8dda7fbdd76b270a9b4df /block/blk-cgroup.c
parent5e08159197b5b98a6648a172008de23f420e6c11 (diff)
blk-throttle: Free up policy node associated with deleted rule
If a rule is being deleted, free up associated policy node. Otherwise that memory is leaked. Signed-off-by: Vivek Goyal <vgoyal@redhat.com> Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-cgroup.c')
-rw-r--r--block/blk-cgroup.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
index d61ec5636ce0..61553670735d 100644
--- a/block/blk-cgroup.c
+++ b/block/blk-cgroup.c
@@ -1075,6 +1075,7 @@ static int blkiocg_file_write(struct cgroup *cgrp, struct cftype *cft,
1075 1075
1076 if (blkio_delete_rule_command(newpn)) { 1076 if (blkio_delete_rule_command(newpn)) {
1077 blkio_policy_delete_node(pn); 1077 blkio_policy_delete_node(pn);
1078 kfree(pn);
1078 spin_unlock_irq(&blkcg->lock); 1079 spin_unlock_irq(&blkcg->lock);
1079 goto update_io_group; 1080 goto update_io_group;
1080 } 1081 }