Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 53623
b: refs/heads/master
c: 05db888
h: refs/heads/master
i:
  53621: 5c31685
  53619: f10ef58
  53615: 596e3ca
v: v3
  • Loading branch information
Mike Christie authored and James Bottomley committed Mar 11, 2007
1 parent fa589cd commit 4eb5e98
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 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: 779ea1207b6a43943faa44f41be7311263315604
refs/heads/master: 05db888a46866fd4eae643792c162e1a5c1a8612
19 changes: 8 additions & 11 deletions trunk/drivers/scsi/libiscsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ void iscsi_conn_failure(struct iscsi_conn *conn, enum iscsi_err err)
}
EXPORT_SYMBOL_GPL(iscsi_conn_failure);

static int iscsi_xmit_imm_task(struct iscsi_conn *conn)
static int iscsi_xmit_mtask(struct iscsi_conn *conn)
{
struct iscsi_hdr *hdr = conn->mtask->hdr;
int rc, was_logout = 0;
Expand All @@ -591,6 +591,9 @@ static int iscsi_xmit_imm_task(struct iscsi_conn *conn)
if (rc)
return rc;

/* done with this in-progress mtask */
conn->mtask = NULL;

if (was_logout) {
set_bit(ISCSI_SUSPEND_BIT, &conn->suspend_tx);
return -ENODATA;
Expand Down Expand Up @@ -643,11 +646,9 @@ static int iscsi_data_xmit(struct iscsi_conn *conn)
conn->ctask = NULL;
}
if (conn->mtask) {
rc = iscsi_xmit_imm_task(conn);
rc = iscsi_xmit_mtask(conn);
if (rc)
goto again;
/* done with this in-progress mtask */
conn->mtask = NULL;
}

/* process immediate first */
Expand All @@ -658,12 +659,10 @@ static int iscsi_data_xmit(struct iscsi_conn *conn)
list_add_tail(&conn->mtask->running,
&conn->mgmt_run_list);
spin_unlock_bh(&conn->session->lock);
rc = iscsi_xmit_imm_task(conn);
rc = iscsi_xmit_mtask(conn);
if (rc)
goto again;
}
/* done with this mtask */
conn->mtask = NULL;
}

/* process command queue */
Expand Down Expand Up @@ -701,12 +700,10 @@ static int iscsi_data_xmit(struct iscsi_conn *conn)
list_add_tail(&conn->mtask->running,
&conn->mgmt_run_list);
spin_unlock_bh(&conn->session->lock);
rc = tt->xmit_mgmt_task(conn, conn->mtask);
if (rc)
rc = iscsi_xmit_mtask(conn);
if (rc)
goto again;
}
/* done with this mtask */
conn->mtask = NULL;
}

return -ENODATA;
Expand Down

0 comments on commit 4eb5e98

Please sign in to comment.