Skip to content

Commit

Permalink
[SCSI] libfc: fix exchange being deleted when the abort itself is tim…
Browse files Browse the repository at this point in the history
…ed out

Should not continue when the abort itself is being timeout since in that case
the exchange will be deleted and relesased. We still want to call the
associated response handler to let the layer, e.g., fcp, know the exchange
itself is being timed out.

Signed-off-by: Yi Zou <yi.zou@intel.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
  • Loading branch information
Yi Zou authored and James Bottomley committed Dec 21, 2010
1 parent d889b30 commit ea3e2e7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions drivers/scsi/libfc/fc_exch.c
Original file line number Diff line number Diff line change
Expand Up @@ -650,10 +650,13 @@ static void fc_exch_timeout(struct work_struct *work)
if (e_stat & ESB_ST_ABNORMAL)
rc = fc_exch_done_locked(ep);
spin_unlock_bh(&ep->ex_lock);
if (!rc)
fc_exch_delete(ep);
if (resp)
resp(sp, ERR_PTR(-FC_EX_TIMEOUT), arg);
if (!rc) {
/* delete the exchange if it's already being aborted */
fc_exch_delete(ep);
return;
}
fc_seq_exch_abort(sp, 2 * ep->r_a_tov);
goto done;
}
Expand Down

0 comments on commit ea3e2e7

Please sign in to comment.