* [PATCH 3/10] iscsi: host locking fix
@ 2006-01-13 5:08 Mike Christie
2006-01-13 18:12 ` Christoph Hellwig
0 siblings, 1 reply; 2+ messages in thread
From: Mike Christie @ 2006-01-13 5:08 UTC (permalink / raw)
To: linux-scsi
>From zhenyu.z.wang@intel.com:
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>
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);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 3/10] iscsi: host locking fix
2006-01-13 5:08 [PATCH 3/10] iscsi: host locking fix Mike Christie
@ 2006-01-13 18:12 ` Christoph Hellwig
0 siblings, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2006-01-13 18:12 UTC (permalink / raw)
To: Mike Christie; +Cc: linux-scsi
On Thu, Jan 12, 2006 at 11:08:30PM -0600, Mike Christie wrote:
> >From zhenyu.z.wang@intel.com:
>
> We should be taking the host_lock instead of the conn lock when
> checking host_busy.
ok
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-01-13 18:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-13 5:08 [PATCH 3/10] iscsi: host locking fix Mike Christie
2006-01-13 18:12 ` Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).