Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 292916
b: refs/heads/master
c: e3d338a
h: refs/heads/master
v: v3
  • Loading branch information
Mike Christie authored and James Bottomley committed Feb 19, 2012
1 parent 10187c8 commit e04f5fe
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 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: 1304be5fe0efb42b7ec6a50dd8e1a9bce2adae17
refs/heads/master: e3d338a536330b5ffc9f28d7c6a4cdf6ba51867a
20 changes: 10 additions & 10 deletions trunk/drivers/scsi/libiscsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1909,6 +1909,16 @@ static enum blk_eh_timer_return iscsi_eh_cmd_timed_out(struct scsi_cmnd *sc)
ISCSI_DBG_EH(session, "scsi cmd %p timedout\n", sc);

spin_lock(&session->lock);
task = (struct iscsi_task *)sc->SCp.ptr;
if (!task) {
/*
* Raced with completion. Blk layer has taken ownership
* so let timeout code complete it now.
*/
rc = BLK_EH_HANDLED;
goto done;
}

if (session->state != ISCSI_STATE_LOGGED_IN) {
/*
* We are probably in the middle of iscsi recovery so let
Expand All @@ -1925,16 +1935,6 @@ static enum blk_eh_timer_return iscsi_eh_cmd_timed_out(struct scsi_cmnd *sc)
goto done;
}

task = (struct iscsi_task *)sc->SCp.ptr;
if (!task) {
/*
* Raced with completion. Just reset timer, and let it
* complete normally
*/
rc = BLK_EH_RESET_TIMER;
goto done;
}

/*
* If we have sent (at least queued to the network layer) a pdu or
* recvd one for the task since the last timeout ask for
Expand Down

0 comments on commit e04f5fe

Please sign in to comment.