diff options
author | Bart Van Assche <bart.vanassche@sandisk.com> | 2016-11-18 23:26:47 +0100 |
---|---|---|
committer | Mike Snitzer <snitzer@redhat.com> | 2016-12-08 20:13:06 +0100 |
commit | 2e91c3694181dc500faffec16c5aaa0ac5e15449 (patch) | |
tree | 2cbe93e2dd3ccee8e242ef3d9736e0bb990138b0 /drivers/md/dm.c | |
parent | dm bufio: drop the lock when doing GFP_NOIO allocation (diff) | |
download | linux-2e91c3694181dc500faffec16c5aaa0ac5e15449.tar.xz linux-2e91c3694181dc500faffec16c5aaa0ac5e15449.zip |
dm: use blk_set_queue_dying() in __dm_destroy()
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>
Diffstat (limited to 'drivers/md/dm.c')
-rw-r--r-- | drivers/md/dm.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/md/dm.c b/drivers/md/dm.c index ef7bf1dd6900..091eaa635645 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c @@ -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); |