X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=block%2Fblk-cgroup.c;h=1ff8e97f853ad719ee13994f0d5fc3fafb76a775;hb=b5e10b06c525414503cd40b536604b0167c062e6;hp=e8918ffaf96d4a0a2dacf75838b5d8a89e5e8ca3;hpb=0faa3146f17295f612abadafbfe3d4346178f10f;p=firefly-linux-kernel-4.4.55.git diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index e8918ffaf96d..1ff8e97f853a 100644 --- a/block/blk-cgroup.c +++ b/block/blk-cgroup.c @@ -876,6 +876,20 @@ 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; + + /* + * @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); }