Skip to content

Commit

Permalink
blk-throttle: Free up policy node associated with deleted rule
Browse files Browse the repository at this point in the history
If a rule is being deleted, free up associated policy node. Otherwise
that memory is leaked.

Signed-off-by: Vivek Goyal <[email protected]>
Acked-by: Tejun Heo <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
rhvgoyal authored and axboe committed Oct 25, 2011
1 parent 5e08159 commit e060f00
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions block/blk-cgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit e060f00

Please sign in to comment.