Skip to content

Commit

Permalink
blkio: deletion of a cgroup was causes oops
Browse files Browse the repository at this point in the history
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 <vgoyal@redhat.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
  • Loading branch information
Vivek Goyal authored and Jens Axboe committed Oct 1, 2010
1 parent 13f9825 commit 61014e9
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions block/blk-cgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
spin_lock(&blkio_list_lock);
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);
}
spin_unlock(&blkio_list_lock);
} while (1);

Expand Down

0 comments on commit 61014e9

Please sign in to comment.