diff options
author | Mike Christie <michaelc@cs.wisc.edu> | 2007-12-13 13:43:34 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-01-11 19:28:41 -0500 |
commit | 1040c99d9fd9de2bf00efae6d91014f890575bdb (patch) | |
tree | 771118c64f009f376affe1bfbdb864dea2580378 /drivers/scsi/libiscsi.c | |
parent | c1635cb786dbadd16fd6e6959dd3b41ae2f2831a (diff) |
[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>
Diffstat (limited to 'drivers/scsi/libiscsi.c')
-rw-r--r-- | drivers/scsi/libiscsi.c | 6 |
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 *)) | |||
1010 | sc->SCp.ptr = NULL; | 1010 | sc->SCp.ptr = NULL; |
1011 | 1011 | ||
1012 | host = sc->device->host; | 1012 | host = sc->device->host; |
1013 | session = iscsi_hostdata(host->hostdata); | 1013 | spin_unlock(host->host_lock); |
1014 | 1014 | ||
1015 | session = iscsi_hostdata(host->hostdata); | ||
1015 | spin_lock(&session->lock); | 1016 | spin_lock(&session->lock); |
1016 | 1017 | ||
1017 | /* | 1018 | /* |
@@ -1077,11 +1078,13 @@ int iscsi_queuecommand(struct scsi_cmnd *sc, void (*done)(struct scsi_cmnd *)) | |||
1077 | spin_unlock(&session->lock); | 1078 | spin_unlock(&session->lock); |
1078 | 1079 | ||
1079 | scsi_queue_work(host, &conn->xmitwork); | 1080 | scsi_queue_work(host, &conn->xmitwork); |
1081 | spin_lock(host->host_lock); | ||
1080 | return 0; | 1082 | return 0; |
1081 | 1083 | ||
1082 | reject: | 1084 | reject: |
1083 | spin_unlock(&session->lock); | 1085 | spin_unlock(&session->lock); |
1084 | debug_scsi("cmd 0x%x rejected (%d)\n", sc->cmnd[0], reason); | 1086 | debug_scsi("cmd 0x%x rejected (%d)\n", sc->cmnd[0], reason); |
1087 | spin_lock(host->host_lock); | ||
1085 | return SCSI_MLQUEUE_HOST_BUSY; | 1088 | return SCSI_MLQUEUE_HOST_BUSY; |
1086 | 1089 | ||
1087 | fault: | 1090 | fault: |
@@ -1091,6 +1094,7 @@ fault: | |||
1091 | sc->result = (DID_NO_CONNECT << 16); | 1094 | sc->result = (DID_NO_CONNECT << 16); |
1092 | scsi_set_resid(sc, scsi_bufflen(sc)); | 1095 | scsi_set_resid(sc, scsi_bufflen(sc)); |
1093 | sc->scsi_done(sc); | 1096 | sc->scsi_done(sc); |
1097 | spin_lock(host->host_lock); | ||
1094 | return 0; | 1098 | return 0; |
1095 | } | 1099 | } |
1096 | EXPORT_SYMBOL_GPL(iscsi_queuecommand); | 1100 | EXPORT_SYMBOL_GPL(iscsi_queuecommand); |