]> git.baikalelectronics.ru Git - kernel.git/commit
blk-mq: add might_sleep check to blk_mq_get_driver_tag()
authorJens Axboe <axboe@fb.com>
Thu, 20 Apr 2017 23:23:13 +0000 (17:23 -0600)
committerJens Axboe <axboe@fb.com>
Thu, 20 Apr 2017 23:23:13 +0000 (17:23 -0600)
commit02421d93034657b8439a182ed24dfb35d071b0fb
treea0ee5921bc165f4680fc0afa35250217298fec48
parentaae14fbba4c4667862dab1a93cf598d1a57efa97
blk-mq: add might_sleep check to blk_mq_get_driver_tag()

If the caller passes in wait=true, it has to be able to block
for a driver tag. We just had a bug where flush insertion
would block on tag allocation, while we had preempt disabled.
Ensure that we catch cases like that earlier next time.

Reviewed-by: Bart Van Assche <Bart.VanAssche@sandisk.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
block/blk-mq.c