Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 309270
b: refs/heads/master
c: 6d18b00
h: refs/heads/master
v: v3
  • Loading branch information
Tejun Heo authored and Jens Axboe committed Apr 20, 2012
1 parent 38e0012 commit 3445a4f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3c96cb32d318f323c1bf972a4c66821f8499e34d
refs/heads/master: 6d18b008daf46bcd82b8ae250aae0785f9714096
11 changes: 8 additions & 3 deletions trunk/block/blk-cgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ static void blkg_destroy_all(struct request_queue *q)
{
struct blkio_group *blkg, *n;

spin_lock_irq(q->queue_lock);
lockdep_assert_held(q->queue_lock);

list_for_each_entry_safe(blkg, n, &q->blkg_list, q_node) {
struct blkio_cgroup *blkcg = blkg->blkcg;
Expand All @@ -267,8 +267,6 @@ static void blkg_destroy_all(struct request_queue *q)
blkg_destroy(blkg);
spin_unlock(&blkcg->lock);
}

spin_unlock_irq(q->queue_lock);
}

static void blkg_rcu_free(struct rcu_head *rcu_head)
Expand Down Expand Up @@ -646,7 +644,10 @@ void blkcg_drain_queue(struct request_queue *q)
*/
void blkcg_exit_queue(struct request_queue *q)
{
spin_lock_irq(q->queue_lock);
blkg_destroy_all(q);
spin_unlock_irq(q->queue_lock);

blk_throtl_exit(q);
}

Expand Down Expand Up @@ -802,6 +803,10 @@ void blkcg_deactivate_policy(struct request_queue *q,

__clear_bit(pol->plid, q->blkcg_pols);

/* if no policy is left, no need for blkgs - shoot them down */
if (bitmap_empty(q->blkcg_pols, BLKCG_MAX_POLS))
blkg_destroy_all(q);

list_for_each_entry(blkg, &q->blkg_list, q_node) {
/* grab blkcg lock too while removing @pd from @blkg */
spin_lock(&blkg->blkcg->lock);
Expand Down

0 comments on commit 3445a4f

Please sign in to comment.