aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libfc
diff options
context:
space:
mode:
authorYi Zou <yi.zou@intel.com>2010-11-30 19:19:25 -0500
committerJames Bottomley <James.Bottomley@suse.de>2010-12-21 13:24:26 -0500
commitea3e2e72eeb3e8a9440a5da965914f9b12088626 (patch)
treec997326d053a0247f03fc09b22abe1d78ab3eb56 /drivers/scsi/libfc
parentd889b30a9196c453120ca54323fe80acb4c27b94 (diff)
[SCSI] libfc: fix exchange being deleted when the abort itself is timed 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>
Diffstat (limited to 'drivers/scsi/libfc')
-rw-r--r--drivers/scsi/libfc/fc_exch.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/scsi/libfc/fc_exch.c b/drivers/scsi/libfc/fc_exch.c
index 8bfb421fcdd6..d21367d3305f 100644
--- a/drivers/scsi/libfc/fc_exch.c
+++ b/drivers/scsi/libfc/fc_exch.c
@@ -650,10 +650,13 @@ static void fc_exch_timeout(struct work_struct *work)
650 if (e_stat & ESB_ST_ABNORMAL) 650 if (e_stat & ESB_ST_ABNORMAL)
651 rc = fc_exch_done_locked(ep); 651 rc = fc_exch_done_locked(ep);
652 spin_unlock_bh(&ep->ex_lock); 652 spin_unlock_bh(&ep->ex_lock);
653 if (!rc)
654 fc_exch_delete(ep);
655 if (resp) 653 if (resp)
656 resp(sp, ERR_PTR(-FC_EX_TIMEOUT), arg); 654 resp(sp, ERR_PTR(-FC_EX_TIMEOUT), arg);
655 if (!rc) {
656 /* delete the exchange if it's already being aborted */
657 fc_exch_delete(ep);
658 return;
659 }
657 fc_seq_exch_abort(sp, 2 * ep->r_a_tov); 660 fc_seq_exch_abort(sp, 2 * ep->r_a_tov);
658 goto done; 661 goto done;
659 } 662 }