|
|
@@ -684,7 +684,6 @@ done:
|
|
|
void qla24xx_do_nack_work(struct scsi_qla_host *vha, struct qla_work_evt *e)
|
|
|
{
|
|
|
fc_port_t *t;
|
|
|
- unsigned long flags;
|
|
|
|
|
|
switch (e->u.nack.type) {
|
|
|
case SRB_NACK_PRLI:
|
|
|
@@ -694,10 +693,8 @@ void qla24xx_do_nack_work(struct scsi_qla_host *vha, struct qla_work_evt *e)
|
|
|
if (t) {
|
|
|
ql_log(ql_log_info, vha, 0xd034,
|
|
|
"%s create sess success %p", __func__, t);
|
|
|
- spin_lock_irqsave(&vha->hw->tgt.sess_lock, flags);
|
|
|
/* create sess has an extra kref */
|
|
|
vha->hw->tgt.tgt_ops->put_sess(e->u.nack.fcport);
|
|
|
- spin_unlock_irqrestore(&vha->hw->tgt.sess_lock, flags);
|
|
|
}
|
|
|
break;
|
|
|
}
|
|
|
@@ -709,9 +706,6 @@ void qla24xx_delete_sess_fn(struct work_struct *work)
|
|
|
{
|
|
|
fc_port_t *fcport = container_of(work, struct fc_port, del_work);
|
|
|
struct qla_hw_data *ha = fcport->vha->hw;
|
|
|
- unsigned long flags;
|
|
|
-
|
|
|
- spin_lock_irqsave(&ha->tgt.sess_lock, flags);
|
|
|
|
|
|
if (fcport->se_sess) {
|
|
|
ha->tgt.tgt_ops->shutdown_sess(fcport);
|
|
|
@@ -719,7 +713,6 @@ void qla24xx_delete_sess_fn(struct work_struct *work)
|
|
|
} else {
|
|
|
qlt_unreg_sess(fcport);
|
|
|
}
|
|
|
- spin_unlock_irqrestore(&ha->tgt.sess_lock, flags);
|
|
|
}
|
|
|
|
|
|
/*
|
|
|
@@ -788,8 +781,9 @@ void qlt_fc_port_added(struct scsi_qla_host *vha, fc_port_t *fcport)
|
|
|
fcport->port_name, sess->loop_id);
|
|
|
sess->local = 0;
|
|
|
}
|
|
|
- ha->tgt.tgt_ops->put_sess(sess);
|
|
|
spin_unlock_irqrestore(&ha->tgt.sess_lock, flags);
|
|
|
+
|
|
|
+ ha->tgt.tgt_ops->put_sess(sess);
|
|
|
}
|
|
|
|
|
|
/*
|
|
|
@@ -4135,9 +4129,7 @@ static void __qlt_do_work(struct qla_tgt_cmd *cmd)
|
|
|
/*
|
|
|
* Drop extra session reference from qla_tgt_handle_cmd_for_atio*(
|
|
|
*/
|
|
|
- spin_lock_irqsave(&ha->tgt.sess_lock, flags);
|
|
|
ha->tgt.tgt_ops->put_sess(sess);
|
|
|
- spin_unlock_irqrestore(&ha->tgt.sess_lock, flags);
|
|
|
return;
|
|
|
|
|
|
out_term:
|
|
|
@@ -4154,9 +4146,7 @@ out_term:
|
|
|
target_free_tag(sess->se_sess, &cmd->se_cmd);
|
|
|
spin_unlock_irqrestore(qpair->qp_lock_ptr, flags);
|
|
|
|
|
|
- spin_lock_irqsave(&ha->tgt.sess_lock, flags);
|
|
|
ha->tgt.tgt_ops->put_sess(sess);
|
|
|
- spin_unlock_irqrestore(&ha->tgt.sess_lock, flags);
|
|
|
}
|
|
|
|
|
|
static void qlt_do_work(struct work_struct *work)
|
|
|
@@ -4365,9 +4355,7 @@ static int qlt_handle_cmd_for_atio(struct scsi_qla_host *vha,
|
|
|
if (!cmd) {
|
|
|
ql_dbg(ql_dbg_io, vha, 0x3062,
|
|
|
"qla_target(%d): Allocation of cmd failed\n", vha->vp_idx);
|
|
|
- spin_lock_irqsave(&ha->tgt.sess_lock, flags);
|
|
|
ha->tgt.tgt_ops->put_sess(sess);
|
|
|
- spin_unlock_irqrestore(&ha->tgt.sess_lock, flags);
|
|
|
return -EBUSY;
|
|
|
}
|
|
|
|
|
|
@@ -6105,17 +6093,19 @@ static void qlt_abort_work(struct qla_tgt *tgt,
|
|
|
}
|
|
|
|
|
|
rc = __qlt_24xx_handle_abts(vha, &prm->abts, sess);
|
|
|
- ha->tgt.tgt_ops->put_sess(sess);
|
|
|
spin_unlock_irqrestore(&ha->tgt.sess_lock, flags2);
|
|
|
|
|
|
+ ha->tgt.tgt_ops->put_sess(sess);
|
|
|
+
|
|
|
if (rc != 0)
|
|
|
goto out_term;
|
|
|
return;
|
|
|
|
|
|
out_term2:
|
|
|
+ spin_unlock_irqrestore(&ha->tgt.sess_lock, flags2);
|
|
|
+
|
|
|
if (sess)
|
|
|
ha->tgt.tgt_ops->put_sess(sess);
|
|
|
- spin_unlock_irqrestore(&ha->tgt.sess_lock, flags2);
|
|
|
|
|
|
out_term:
|
|
|
spin_lock_irqsave(&ha->hardware_lock, flags);
|
|
|
@@ -6175,9 +6165,10 @@ static void qlt_tmr_work(struct qla_tgt *tgt,
|
|
|
scsilun_to_int((struct scsi_lun *)&a->u.isp24.fcp_cmnd.lun);
|
|
|
|
|
|
rc = qlt_issue_task_mgmt(sess, unpacked_lun, fn, iocb, 0);
|
|
|
- ha->tgt.tgt_ops->put_sess(sess);
|
|
|
spin_unlock_irqrestore(&ha->tgt.sess_lock, flags);
|
|
|
|
|
|
+ ha->tgt.tgt_ops->put_sess(sess);
|
|
|
+
|
|
|
if (rc != 0)
|
|
|
goto out_term;
|
|
|
return;
|