diff options
author | Vivek Goyal <vgoyal@redhat.com> | 2011-10-25 17:48:12 +0400 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2011-10-25 17:48:12 +0400 |
commit | e060f00beee23568fe2c4faf1e88ff22edefd7b2 (patch) | |
tree | a953ca37996c2010c4e8dda7fbdd76b270a9b4df | |
parent | 5e08159197b5b98a6648a172008de23f420e6c11 (diff) | |
download | linux-e060f00beee23568fe2c4faf1e88ff22edefd7b2.tar.xz |
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.c | 1 |
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, if (blkio_delete_rule_command(newpn)) { blkio_policy_delete_node(pn); + kfree(pn); spin_unlock_irq(&blkcg->lock); goto update_io_group; } |