Skip to content

Commit e060f00

Browse files
rhvgoyalaxboe
authored andcommitted
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>
1 parent 5e08159 commit e060f00

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎block/blk-cgroup.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1075,6 +1075,7 @@ static int blkiocg_file_write(struct cgroup *cgrp, struct cftype *cft,
10751075

10761076
if (blkio_delete_rule_command(newpn)) {
10771077
blkio_policy_delete_node(pn);
1078+
kfree(pn);
10781079
spin_unlock_irq(&blkcg->lock);
10791080
goto update_io_group;
10801081
}

0 commit comments

Comments
 (0)