Removes the goto logic with two identical function calls and in particular removes the "just in case" msleep(250). The latter has no reasonable explanation why it might be useful and in my experience is not. Signed-off-by: Joern Engel <joern@xxxxxxxxx> --- drivers/scsi/qla2xxx/qla_target.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c index c87732b07f3f..275becf7e939 100644 --- a/drivers/scsi/qla2xxx/qla_target.c +++ b/drivers/scsi/qla2xxx/qla_target.c @@ -2680,14 +2680,11 @@ static void qlt_send_term_exchange(struct scsi_qla_host *vha, if (qlt_issue_marker(vha, ha_locked) < 0) return; - if (ha_locked) { - rc = __qlt_send_term_exchange(vha, cmd, atio); - goto done; - } - spin_lock_irqsave(&vha->hw->hardware_lock, flags); + if (!ha_locked) + spin_lock_irqsave(&vha->hw->hardware_lock, flags); rc = __qlt_send_term_exchange(vha, cmd, atio); - spin_unlock_irqrestore(&vha->hw->hardware_lock, flags); -done: + if (!ha_locked) + spin_unlock_irqrestore(&vha->hw->hardware_lock, flags); /* * Terminate exchange will tell fw to release any active CTIO * that's in FW posession and cleanup the exchange. @@ -2700,9 +2697,6 @@ done: * back w/some err. Free the cmd now. */ if ((rc == 1) && (cmd->state != QLA_TGT_STATE_ABORTED)) { - if (!ha_locked && !in_interrupt()) - msleep(250); /* just in case */ - if (cmd->sg_mapped) qlt_unmap_sg(vha, cmd); vha->hw->tgt.tgt_ops->free_cmd(cmd); -- 2.0.0.rc0.1.g7b2ba98 -- To unsubscribe from this list: send the line "unsubscribe target-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html