Commit ea3e2e72 authored by Yi Zou's avatar Yi Zou Committed by James Bottomley

[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: default avatarYi Zou <yi.zou@intel.com>
Signed-off-by: default avatarRobert Love <robert.w.love@intel.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
parent d889b30a
...@@ -650,10 +650,13 @@ static void fc_exch_timeout(struct work_struct *work) ...@@ -650,10 +650,13 @@ static void fc_exch_timeout(struct work_struct *work)
if (e_stat & ESB_ST_ABNORMAL) if (e_stat & ESB_ST_ABNORMAL)
rc = fc_exch_done_locked(ep); rc = fc_exch_done_locked(ep);
spin_unlock_bh(&ep->ex_lock); spin_unlock_bh(&ep->ex_lock);
if (!rc)
fc_exch_delete(ep);
if (resp) if (resp)
resp(sp, ERR_PTR(-FC_EX_TIMEOUT), arg); 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); fc_seq_exch_abort(sp, 2 * ep->r_a_tov);
goto done; goto done;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment