loop: No need to initialize ->queue_lock explicitly before calling blk_cleanup_queue()
authorVivek Goyal <vgoyal@redhat.com>
Thu, 3 Mar 2011 00:04:50 +0000 (19:04 -0500)
committerJens Axboe <jaxboe@fusionio.com>
Thu, 3 Mar 2011 00:06:49 +0000 (19:06 -0500)
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: Jens Axboe <jaxboe@fusionio.com>
drivers/block/loop.c

index 49e6a54..44e18c0 100644 (file)
@@ -1641,9 +1641,6 @@ out:
 
 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);