diff options
Diffstat (limited to 'drivers/block/loop.c')
-rw-r--r-- | drivers/block/loop.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/block/loop.c b/drivers/block/loop.c index 44e18c073c44..49e6a545eb63 100644 --- a/drivers/block/loop.c +++ b/drivers/block/loop.c | |||
@@ -1641,6 +1641,9 @@ out: | |||
1641 | 1641 | ||
1642 | static void loop_free(struct loop_device *lo) | 1642 | static void loop_free(struct loop_device *lo) |
1643 | { | 1643 | { |
1644 | if (!lo->lo_queue->queue_lock) | ||
1645 | lo->lo_queue->queue_lock = &lo->lo_queue->__queue_lock; | ||
1646 | |||
1644 | blk_cleanup_queue(lo->lo_queue); | 1647 | blk_cleanup_queue(lo->lo_queue); |
1645 | put_disk(lo->lo_disk); | 1648 | put_disk(lo->lo_disk); |
1646 | list_del(&lo->lo_list); | 1649 | list_del(&lo->lo_list); |