Commit cd25f549 authored by Vivek Goyal's avatar Vivek Goyal Committed by Jens Axboe

loop: No need to initialize ->queue_lock explicitly before calling blk_cleanup_queue()

Now we initialize ->queue_lock at queue allocation time so driver does
not have to worry about initializing it before calling
blk_cleanup_queue().
Signed-off-by: default avatarJens Axboe <jaxboe@fusionio.com>
parent c94a96ac
......@@ -1641,9 +1641,6 @@ static struct loop_device *loop_alloc(int i)
static void loop_free(struct loop_device *lo)
{
if (!lo->lo_queue->queue_lock)
lo->lo_queue->queue_lock = &lo->lo_queue->__queue_lock;
blk_cleanup_queue(lo->lo_queue);
put_disk(lo->lo_disk);
list_del(&lo->lo_list);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment