summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_queue.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/scsi_queue.c')
-rw-r--r--drivers/scsi/scsi_queue.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/scsi/scsi_queue.c b/drivers/scsi/scsi_queue.c
index 4a62566f1..162088204 100644
--- a/drivers/scsi/scsi_queue.c
+++ b/drivers/scsi/scsi_queue.c
@@ -79,6 +79,7 @@ static const char RCSid[] = "$Header: /mnt/ide/home/eric/CVSROOT/linux/drivers/s
int scsi_mlqueue_insert(Scsi_Cmnd * cmd, int reason)
{
struct Scsi_Host *host;
+ unsigned long flags;
SCSI_LOG_MLQUEUE(1, printk("Inserting command %p into mlqueue\n", cmd));
@@ -136,8 +137,10 @@ int scsi_mlqueue_insert(Scsi_Cmnd * cmd, int reason)
* Decrement the counters, since these commands are no longer
* active on the host/device.
*/
+ spin_lock_irqsave(&io_request_lock, flags);
cmd->host->host_busy--;
cmd->device->device_busy--;
+ spin_unlock_irqrestore(&io_request_lock, flags);
/*
* Insert this command at the head of the queue for it's device.