diff options
author | Vivek Goyal <vgoyal@redhat.com> | 2011-10-25 15:48:12 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2011-10-25 15:48:12 +0200 |
commit | e060f00beee23568fe2c4faf1e88ff22edefd7b2 (patch) | |
tree | a953ca37996c2010c4e8dda7fbdd76b270a9b4df /block/blk-cgroup.c | |
parent | block: warn if tag is greater than real_max_depth. (diff) | |
download | linux-e060f00beee23568fe2c4faf1e88ff22edefd7b2.tar.xz linux-e060f00beee23568fe2c4faf1e88ff22edefd7b2.zip |
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.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; } |