disable some mediatekl custom warnings
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / block / blk-cgroup.c
index e8918ffaf96d4a0a2dacf75838b5d8a89e5e8ca3..b95219d2168d0957eb2a537c920cac531d7238d7 100644 (file)
@@ -876,6 +876,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);
 }