linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] blk-throttle: Free up policy node associated with deleted rule
@ 2011-10-20 21:08 Vivek Goyal
  2011-10-20 21:08 ` [PATCH 2/2] blk-throttle: Take blkcg->lock while traversing blkcg->policy_list Vivek Goyal
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Vivek Goyal @ 2011-10-20 21:08 UTC (permalink / raw)
  To: linux-kernel, jaxboe; +Cc: vgoyal, tj

If a rule is being deleted, free up associated policy node. Otherwise
that memory is leaked.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
---
 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 b596e54..4ddf11f 100644
--- a/block/blk-cgroup.c
+++ b/block/blk-cgroup.c
@@ -1085,6 +1085,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;
 	}
-- 
1.7.4.4


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2011-10-25 19:01 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-20 21:08 [PATCH 1/2] blk-throttle: Free up policy node associated with deleted rule Vivek Goyal
2011-10-20 21:08 ` [PATCH 2/2] blk-throttle: Take blkcg->lock while traversing blkcg->policy_list Vivek Goyal
2011-10-20 21:11   ` Tejun Heo
2011-10-20 21:20     ` Vivek Goyal
2011-10-20 21:29       ` Tejun Heo
2011-10-21 12:10         ` Vivek Goyal
2011-10-25 14:13           ` Jens Axboe
2011-10-25 19:01             ` Vivek Goyal
2011-10-20 21:09 ` [PATCH 1/2] blk-throttle: Free up policy node associated with deleted rule Tejun Heo
2011-10-25 13:36 ` Vivek Goyal
2011-10-25 13:45   ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).