Skip to content

Commit

Permalink
dm: use blk_set_queue_dying() in __dm_destroy()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Bart Van Assche authored and Mike Snitzer committed Dec 8, 2016
1 parent 41c73a4 commit 2e91c36
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/md/dm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1886,9 +1886,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);
Expand Down

0 comments on commit 2e91c36

Please sign in to comment.