diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-11-14 15:01:02 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-11-14 15:01:02 -0800 |
commit | ecdca043ebe8e3172e0400d0966831e2e60870a0 (patch) | |
tree | c1433e2399f544970e1f9ae7a469dbc9172c8e9f /block/blk-cgroup.c | |
parent | bb3215e97bb1ab917ed858322a9399fb32e69e49 (diff) | |
parent | 77b67063bb6bce6d475e910d3b886a606d0d91f7 (diff) |
Merge 3.7-rc5 into driver-core-next
Diffstat (limited to 'block/blk-cgroup.c')
-rw-r--r-- | block/blk-cgroup.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index cafcd7431189..d0b770391ad4 100644 --- a/block/blk-cgroup.c +++ b/block/blk-cgroup.c @@ -285,6 +285,13 @@ static void blkg_destroy_all(struct request_queue *q) blkg_destroy(blkg); spin_unlock(&blkcg->lock); } + + /* + * root blkg is destroyed. Just clear the pointer since + * root_rl does not take reference on root blkg. + */ + q->root_blkg = NULL; + q->root_rl.blkg = NULL; } static void blkg_rcu_free(struct rcu_head *rcu_head) @@ -326,6 +333,9 @@ struct request_list *__blk_queue_next_rl(struct request_list *rl, */ if (rl == &q->root_rl) { ent = &q->blkg_list; + /* There are no more block groups, hence no request lists */ + if (list_empty(ent)) + return NULL; } else { blkg = container_of(rl, struct blkcg_gq, rl); ent = &blkg->q_node; |