diff mbox series

[4.4,6/9] dm: use blk_set_queue_dying() in __dm_destroy()

Message ID 20191122105113.11213-6-lee.jones@linaro.org
State Superseded
Headers show
Series [4.4,1/9] ARM: 8904/1: skip nomap memblocks while finding the lowmem/highmem boundary | expand

Commit Message

Lee Jones Nov. 22, 2019, 10:51 a.m. UTC
From: Bart Van Assche <bart.vanassche@sandisk.com>


[ Upstream commit 2e91c3694181dc500faffec16c5aaa0ac5e15449 ]

After QUEUE_FLAG_DYING has been set any code that is waiting in
get_request() should be woken up.  But to get this behaviour
blk_set_queue_dying() must be used instead of only setting
QUEUE_FLAG_DYING.

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>

Signed-off-by: Mike Snitzer <snitzer@redhat.com>

Signed-off-by: Lee Jones <lee.jones@linaro.org>

---
 drivers/md/dm.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

-- 
2.24.0
diff mbox series

Patch

diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index 3d9a80759d95..c752c55f0bb2 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -2939,9 +2939,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)
 		flush_kthread_worker(&md->kworker);