Message ID | 1408354398-10226-65-git-send-email-luis.henriques@canonical.com |
---|---|
State | New |
Headers | show |
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index 354efcdad847..61f595f4525f 100644 --- a/block/blk-cgroup.c +++ b/block/blk-cgroup.c @@ -856,6 +856,13 @@ void blkcg_drain_queue(struct request_queue *q) { lockdep_assert_held(q->queue_lock); + /* + * @q could be exiting and already have destroyed all blkgs as + * indicated by NULL root_blkg. If so, don't confuse policies. + */ + if (!q->root_blkg) + return; + blk_throtl_drain(q); }