diff mbox

[02/14] dm: Use blk_set_queue_dying() in __dm_destroy()

Message ID a7dac630-0d7e-68c8-159f-459d8a6aa795@sandisk.com (mailing list archive)
State Accepted, archived
Delegated to: Mike Snitzer
Headers show

Commit Message

Bart Van Assche Nov. 18, 2016, 10:26 p.m. UTC
After QUEUE_FLAG_DYING has been set any code that is waiting in
get_request() should be woken up. Hence call blk_set_queue_dying()
instead of only setting QUEUE_FLAG_DYING.

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
---
 drivers/md/dm.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
diff mbox

Patch

diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index 49c4d00..d19c372 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -1885,9 +1885,7 @@  static void __dm_destroy(struct mapped_device *md, bool wait)
 	set_bit(DMF_FREEING, &md->flags);
 	spin_unlock(&_minor_lock);
 
-	spin_lock_irq(q->queue_lock);
-	queue_flag_set(QUEUE_FLAG_DYING, q);
-	spin_unlock_irq(q->queue_lock);
+	blk_set_queue_dying(q);
 
 	if (dm_request_based(md) && md->kworker_task)
 		kthread_flush_worker(&md->kworker);