summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Christie <michaelc@cs.wisc.edu>2007-12-13 12:43:34 -0600
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-01-11 18:28:41 -0600
commit1040c99d9fd9de2bf00efae6d91014f890575bdb (patch)
tree771118c64f009f376affe1bfbdb864dea2580378
parentc1635cb786dbadd16fd6e6959dd3b41ae2f2831a (diff)
downloadlinux-next-1040c99d9fd9de2bf00efae6d91014f890575bdb.tar.gz
[SCSI] libiscsi: Drop host lock in queuecommand
The driver does not need the host lock in queuecommand so drop it. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
-rw-r--r--drivers/scsi/libiscsi.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c
index 4461317e617f..b0bc8c3b0ecb 100644
--- a/drivers/scsi/libiscsi.c
+++ b/drivers/scsi/libiscsi.c
@@ -1010,8 +1010,9 @@ int iscsi_queuecommand(struct scsi_cmnd *sc, void (*done)(struct scsi_cmnd *))
sc->SCp.ptr = NULL;
host = sc->device->host;
- session = iscsi_hostdata(host->hostdata);
+ spin_unlock(host->host_lock);
+ session = iscsi_hostdata(host->hostdata);
spin_lock(&session->lock);
/*
@@ -1077,11 +1078,13 @@ int iscsi_queuecommand(struct scsi_cmnd *sc, void (*done)(struct scsi_cmnd *))
spin_unlock(&session->lock);
scsi_queue_work(host, &conn->xmitwork);
+ spin_lock(host->host_lock);
return 0;
reject:
spin_unlock(&session->lock);
debug_scsi("cmd 0x%x rejected (%d)\n", sc->cmnd[0], reason);
+ spin_lock(host->host_lock);
return SCSI_MLQUEUE_HOST_BUSY;
fault:
@@ -1091,6 +1094,7 @@ fault:
sc->result = (DID_NO_CONNECT << 16);
scsi_set_resid(sc, scsi_bufflen(sc));
sc->scsi_done(sc);
+ spin_lock(host->host_lock);
return 0;
}
EXPORT_SYMBOL_GPL(iscsi_queuecommand);