Skip to content
Commit cafe01ef authored by Ming Lei's avatar Ming Lei Committed by Jens Axboe
Browse files

block: release disk reference in hd_struct_free_work



Commit e8c7d14a ("block: revert back to synchronous request_queue removal")
stops to release request queue from wq context because that commit
supposed all blk_put_queue() is called in context which is allowed
to sleep. However, this assumption isn't true because we release disk's
reference in partition's percpu_ref's ->release() which doesn't allow
to sleep, because the ->release() is run via call_rcu().

Fixes this issue by moving put disk reference into hd_struct_free_work()

Fixes: e8c7d14a ("block: revert back to synchronous request_queue removal")
Reported-by: default avatarIlya Dryomov <idryomov@gmail.com>
Signed-off-by: default avatarMing Lei <ming.lei@redhat.com>
Tested-by: default avatarIlya Dryomov <idryomov@gmail.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Cc: Luis Chamberlain <mcgrof@kernel.org>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent de1b0ee4
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment