aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorzhenyu.z.wang@intel.com <zhenyu.z.wang@intel.com>2006-01-13 18:05:41 -0600
committerJames Bottomley <jejb@mulgrave.(none)>2006-01-14 10:55:16 -0600
commit3e97c7e6cda933e3a1b518a8100d155c532a3cfc (patch)
tree9a6682763124014c601808127c4ac7f5f50c6fb0 /drivers
parentbf310b8f582bddec20c27e32ffbaf8e2c91e147c (diff)
downloadkernel_samsung_aries-3e97c7e6cda933e3a1b518a8100d155c532a3cfc.zip
kernel_samsung_aries-3e97c7e6cda933e3a1b518a8100d155c532a3cfc.tar.gz
kernel_samsung_aries-3e97c7e6cda933e3a1b518a8100d155c532a3cfc.tar.bz2
[SCSI] iscsi: host locking fix
We should be taking the host_lock instead of the conn lock when checking host_busy. Signed-off-by: Alex Aizman <itn780@yahoo.com> Signed-off-by: Dmitry Yusupov <dmitry_yus@yahoo.com> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/iscsi_tcp.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/scsi/iscsi_tcp.c b/drivers/scsi/iscsi_tcp.c
index 550ff66..cd1491e 100644
--- a/drivers/scsi/iscsi_tcp.c
+++ b/drivers/scsi/iscsi_tcp.c
@@ -2559,6 +2559,7 @@ iscsi_conn_destroy(iscsi_connh_t connh)
{
struct iscsi_conn *conn = iscsi_ptr(connh);
struct iscsi_session *session = conn->session;
+ unsigned long flags;
mutex_lock(&conn->xmitmutex);
set_bit(SUSPEND_BIT, &conn->suspend_tx);
@@ -2598,12 +2599,12 @@ iscsi_conn_destroy(iscsi_connh_t connh)
* time out or fail.
*/
for (;;) {
- spin_lock_bh(&conn->lock);
+ spin_lock_irqsave(session->host->host_lock, flags);
if (!session->host->host_busy) { /* OK for ERL == 0 */
- spin_unlock_bh(&conn->lock);
+ spin_unlock_irqrestore(session->host->host_lock, flags);
break;
}
- spin_unlock_bh(&conn->lock);
+ spin_unlock_irqrestore(session->host->host_lock, flags);
msleep_interruptible(500);
printk("conn_destroy(): host_busy %d host_failed %d\n",
session->host->host_busy, session->host->host_failed);