[SCSI] ibmvscsi: Fix slave_configure deadlock
authorBrian King <brking@linux.vnet.ibm.com>
Mon, 1 Apr 2013 14:44:26 +0000 (09:44 -0500)
committerJames Bottomley <JBottomley@Parallels.com>
Sat, 6 Apr 2013 10:35:51 +0000 (11:35 +0100)
No locks should be held when calling scsi_adjust_queue_depth
so drop the lock in slave_configure prior to calling it.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Acked-by: Robert Jennings <rcj@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/ibmvscsi/ibmvscsi.c

index a044f59..d0fa4b6 100644 (file)
@@ -1899,8 +1899,8 @@ static int ibmvscsi_slave_configure(struct scsi_device *sdev)
                sdev->allow_restart = 1;
                blk_queue_rq_timeout(sdev->request_queue, 120 * HZ);
        }
-       scsi_adjust_queue_depth(sdev, 0, shost->cmd_per_lun);
        spin_unlock_irqrestore(shost->host_lock, lock_flags);
+       scsi_adjust_queue_depth(sdev, 0, shost->cmd_per_lun);
        return 0;
 }