diff options
-rw-r--r-- | drivers/scsi/iscsi_tcp.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/scsi/iscsi_tcp.c b/drivers/scsi/iscsi_tcp.c index 550ff66ba9ec..cd1491e52361 100644 --- a/drivers/scsi/iscsi_tcp.c +++ b/drivers/scsi/iscsi_tcp.c | |||
@@ -2559,6 +2559,7 @@ iscsi_conn_destroy(iscsi_connh_t connh) | |||
2559 | { | 2559 | { |
2560 | struct iscsi_conn *conn = iscsi_ptr(connh); | 2560 | struct iscsi_conn *conn = iscsi_ptr(connh); |
2561 | struct iscsi_session *session = conn->session; | 2561 | struct iscsi_session *session = conn->session; |
2562 | unsigned long flags; | ||
2562 | 2563 | ||
2563 | mutex_lock(&conn->xmitmutex); | 2564 | mutex_lock(&conn->xmitmutex); |
2564 | set_bit(SUSPEND_BIT, &conn->suspend_tx); | 2565 | set_bit(SUSPEND_BIT, &conn->suspend_tx); |
@@ -2598,12 +2599,12 @@ iscsi_conn_destroy(iscsi_connh_t connh) | |||
2598 | * time out or fail. | 2599 | * time out or fail. |
2599 | */ | 2600 | */ |
2600 | for (;;) { | 2601 | for (;;) { |
2601 | spin_lock_bh(&conn->lock); | 2602 | spin_lock_irqsave(session->host->host_lock, flags); |
2602 | if (!session->host->host_busy) { /* OK for ERL == 0 */ | 2603 | if (!session->host->host_busy) { /* OK for ERL == 0 */ |
2603 | spin_unlock_bh(&conn->lock); | 2604 | spin_unlock_irqrestore(session->host->host_lock, flags); |
2604 | break; | 2605 | break; |
2605 | } | 2606 | } |
2606 | spin_unlock_bh(&conn->lock); | 2607 | spin_unlock_irqrestore(session->host->host_lock, flags); |
2607 | msleep_interruptible(500); | 2608 | msleep_interruptible(500); |
2608 | printk("conn_destroy(): host_busy %d host_failed %d\n", | 2609 | printk("conn_destroy(): host_busy %d host_failed %d\n", |
2609 | session->host->host_busy, session->host->host_failed); | 2610 | session->host->host_busy, session->host->host_failed); |