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 b9f4cc494ece..28d227c5ca77 100644 --- a/block/blk-cgroup.c +++ b/block/blk-cgroup.c | |||
| @@ -872,6 +872,13 @@ void blkcg_drain_queue(struct request_queue *q) | |||
| 872 | { | 872 | { |
| 873 | lockdep_assert_held(q->queue_lock); | 873 | lockdep_assert_held(q->queue_lock); |
| 874 | 874 | ||
| 875 | /* | ||
| 876 | * @q could be exiting and already have destroyed all blkgs as | ||
| 877 | * indicated by NULL root_blkg. If so, don't confuse policies. | ||
| 878 | */ | ||
| 879 | if (!q->root_blkg) | ||
| 880 | return; | ||
| 881 | |||
| 875 | blk_throtl_drain(q); | 882 | blk_throtl_drain(q); |
| 876 | } | 883 | } |
| 877 | 884 | ||
