Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 226889
b: refs/heads/master
c: bfcf72e
h: refs/heads/master
i:
  226887: 46c348a
v: v3
  • Loading branch information
Mike Christie authored and James Bottomley committed Dec 31, 2010
1 parent 5297def commit 9259ab7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f41d472179a0d7c8e8160c85180ab1124947068e
refs/heads/master: bfcf72e4426da2fd8f8081a641385ffc3ccc2282
14 changes: 6 additions & 8 deletions trunk/drivers/scsi/libiscsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1338,17 +1338,16 @@ void iscsi_session_failure(struct iscsi_session *session,
{
struct iscsi_conn *conn;
struct device *dev;
unsigned long flags;

spin_lock_irqsave(&session->lock, flags);
spin_lock_bh(&session->lock);
conn = session->leadconn;
if (session->state == ISCSI_STATE_TERMINATE || !conn) {
spin_unlock_irqrestore(&session->lock, flags);
spin_unlock_bh(&session->lock);
return;
}

dev = get_device(&conn->cls_conn->dev);
spin_unlock_irqrestore(&session->lock, flags);
spin_unlock_bh(&session->lock);
if (!dev)
return;
/*
Expand All @@ -1367,17 +1366,16 @@ EXPORT_SYMBOL_GPL(iscsi_session_failure);
void iscsi_conn_failure(struct iscsi_conn *conn, enum iscsi_err err)
{
struct iscsi_session *session = conn->session;
unsigned long flags;

spin_lock_irqsave(&session->lock, flags);
spin_lock_bh(&session->lock);
if (session->state == ISCSI_STATE_FAILED) {
spin_unlock_irqrestore(&session->lock, flags);
spin_unlock_bh(&session->lock);
return;
}

if (conn->stop_stage == 0)
session->state = ISCSI_STATE_FAILED;
spin_unlock_irqrestore(&session->lock, flags);
spin_unlock_bh(&session->lock);

set_bit(ISCSI_SUSPEND_BIT, &conn->suspend_tx);
set_bit(ISCSI_SUSPEND_BIT, &conn->suspend_rx);
Expand Down

0 comments on commit 9259ab7

Please sign in to comment.