Skip to content

Commit

Permalink
loop: No need to initialize ->queue_lock explicitly before calling bl…
Browse files Browse the repository at this point in the history
…k_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: Jens Axboe <jaxboe@fusionio.com>
  • Loading branch information
rhvgoyal authored and Jens Axboe committed Mar 3, 2011
1 parent c94a96a commit cd25f54
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions drivers/block/loop.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit cd25f54

Please sign in to comment.