summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVivek Goyal <vgoyal@redhat.com>2011-10-25 15:48:12 +0200
committerJens Axboe <axboe@kernel.dk>2011-10-25 15:48:12 +0200
commite060f00beee23568fe2c4faf1e88ff22edefd7b2 (patch)
treea953ca37996c2010c4e8dda7fbdd76b270a9b4df
parent5e08159197b5b98a6648a172008de23f420e6c11 (diff)
downloadop-kernel-dev-e060f00beee23568fe2c4faf1e88ff22edefd7b2.zip
op-kernel-dev-e060f00beee23568fe2c4faf1e88ff22edefd7b2.tar.gz
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>
-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 d61ec56..6155367 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,
if (blkio_delete_rule_command(newpn)) {
blkio_policy_delete_node(pn);
+ kfree(pn);
spin_unlock_irq(&blkcg->lock);
goto update_io_group;
}
OpenPOWER on IntegriCloud