Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+0 −3
Original line number Original line Diff line number Diff line
@@ -1641,9 +1641,6 @@ out:


static void loop_free(struct loop_device *lo)
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);
	blk_cleanup_queue(lo->lo_queue);
	put_disk(lo->lo_disk);
	put_disk(lo->lo_disk);
	list_del(&lo->lo_list);
	list_del(&lo->lo_list);