Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e060f00b authored by Vivek Goyal's avatar Vivek Goyal Committed by Jens Axboe
Browse files

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: default avatarVivek Goyal <vgoyal@redhat.com>
Acked-by: default avatarTejun Heo <tj@kernel.org>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 5e081591
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -1075,6 +1075,7 @@ static int blkiocg_file_write(struct cgroup *cgrp, struct cftype *cft,


	if (blkio_delete_rule_command(newpn)) {
	if (blkio_delete_rule_command(newpn)) {
		blkio_policy_delete_node(pn);
		blkio_policy_delete_node(pn);
		kfree(pn);
		spin_unlock_irq(&blkcg->lock);
		spin_unlock_irq(&blkcg->lock);
		goto update_io_group;
		goto update_io_group;
	}
	}