path: root/block
diff options
authorVivek Goyal <>2010-10-01 14:49:44 +0200
committerJens Axboe <>2010-10-01 14:49:44 +0200
commit61014e96e6ed55b8db0af31574eec2a75d4e8755 (patch)
tree69201251c3c5c51a0ed31dbe595743e60fbdaf52 /block
parent13f98250f587b7defa39ed738dfa74b600e46e7b (diff)
blkio: deletion of a cgroup was causes oops
o Now a cgroup list of blkg elements can contain blkg from multiple policies. Before sending an unlink event, make sure blkg belongs to they policy. If policy does not own the blkg, do not send update for this blkg. Signed-off-by: Vivek Goyal <> Signed-off-by: Jens Axboe <>
Diffstat (limited to 'block')
1 files changed, 5 insertions, 4 deletions
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
index 86e7066..b06ca70 100644
--- a/block/blk-cgroup.c
+++ b/block/blk-cgroup.c
@@ -1411,13 +1411,14 @@ static void blkiocg_destroy(struct cgroup_subsys *subsys, struct cgroup *cgroup)
* This blkio_group is being unlinked as associated cgroup is
* going away. Let all the IO controlling policies know about
- * this event. Currently this is static call to one io
- * controlling policy. Once we have more policies in place, we
- * need some dynamic registration of callback function.
+ * this event.
- list_for_each_entry(blkiop, &blkio_list, list)
+ list_for_each_entry(blkiop, &blkio_list, list) {
+ if (blkiop->plid != blkg->plid)
+ continue;
blkiop->ops.blkio_unlink_group_fn(key, blkg);
+ }
} while (1);
OpenPOWER on IntegriCloud