]> git.baikalelectronics.ru Git - kernel.git/commit
dm: fix request-based dm's use of dm_wait_for_completion
authorMike Snitzer <snitzer@redhat.com>
Tue, 11 Dec 2018 14:10:26 +0000 (09:10 -0500)
committerJens Axboe <axboe@kernel.dk>
Tue, 11 Dec 2018 14:40:02 +0000 (07:40 -0700)
commit073b253d74b203872c9a18c083aaf6ee03b5520d
tree909ff78658e5c82da4e8d575da1457dcaccd79bd
parenta23c40307b83dfd10b629fc57197066aa9d95676
dm: fix request-based dm's use of dm_wait_for_completion

The md->wait waitqueue is used by both bio-based and request-based DM.
Commit caf728b1dc ("dm rq: leverage blk_mq_queue_busy() to check for
outstanding IO") lost sight of the requirement that
dm_wait_for_completion() must work with all types of DM devices.

Fix md_in_flight() to call the blk-mq or bio-based method accordingly.

Fixes: caf728b1dc ("dm rq: leverage blk_mq_queue_busy() to check for outstanding IO")
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/md/dm-rq.c
drivers/md/dm.c