diff options
-rw-r--r-- | block/blk-cgroup.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index f3b44a65fc7a..54f35d1c07a9 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) |