]> git.baikalelectronics.ru Git - kernel.git/commit
block: wake up all tasks blocked in get_request()
authorMing Lei <ming.lei@redhat.com>
Thu, 16 Nov 2017 00:08:44 +0000 (08:08 +0800)
committerJens Axboe <axboe@kernel.dk>
Thu, 16 Nov 2017 04:51:03 +0000 (21:51 -0700)
commit16f9a4ea0b047eb3ffd24900783c66fc53f84b00
tree519bf83ce493bdb2557137b05b770e921827b3cd
parent5788b3be578fd522e6ec41fc8c30d001a2d4df09
block: wake up all tasks blocked in get_request()

Once blk_set_queue_dying() is done in blk_cleanup_queue(), we call
blk_freeze_queue() and wait for q->q_usage_counter becoming zero. But
if there are tasks blocked in get_request(), q->q_usage_counter can
never become zero. So we have to wake up all these tasks in
blk_set_queue_dying() first.

Fixes: c899493467a8f97c ("block: generic request_queue reference counting")
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-core.c