Commit e1013f14 authored by Roland Dreier's avatar Roland Dreier Committed by Nicholas Bellinger

qla2xxx: Remove racy, now-redundant check of sess_tearing_down

Now that target_submit_cmd() / target_get_sess_cmd() check
sess_tearing_down before adding commands to the list, we no longer
need the check in qlt_do_work().  In fact this check is racy anyway
(and that race is what inspired the change to add the check of
sess_tearing_down to the target core).

Cc: Chad Dupuis <chad.dupuis@qlogic.com>
Cc: Arun Easi <arun.easi@qlogic.com>
Signed-off-by: default avatarRoland Dreier <roland@purestorage.com>
Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
parent bc187ea6
...@@ -2643,19 +2643,9 @@ static void qlt_do_work(struct work_struct *work) ...@@ -2643,19 +2643,9 @@ static void qlt_do_work(struct work_struct *work)
spin_lock_irqsave(&ha->hardware_lock, flags); spin_lock_irqsave(&ha->hardware_lock, flags);
sess = ha->tgt.tgt_ops->find_sess_by_s_id(vha, sess = ha->tgt.tgt_ops->find_sess_by_s_id(vha,
atio->u.isp24.fcp_hdr.s_id); atio->u.isp24.fcp_hdr.s_id);
if (sess) { /* Do kref_get() before dropping qla_hw_data->hardware_lock. */
if (unlikely(sess->se_sess->sess_tearing_down)) { if (sess)
sess = NULL; kref_get(&sess->se_sess->sess_kref);
spin_unlock_irqrestore(&ha->hardware_lock, flags);
goto out_term;
} else {
/*
* Do the extra kref_get() before dropping
* qla_hw_data->hardware_lock.
*/
kref_get(&sess->se_sess->sess_kref);
}
}
spin_unlock_irqrestore(&ha->hardware_lock, flags); spin_unlock_irqrestore(&ha->hardware_lock, flags);
if (unlikely(!sess)) { if (unlikely(!sess)) {
......
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