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 | 5e08159197b5b98a6648a172008de23f420e6c11 (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.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index d61ec5636ce..61553670735 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; } |