diff options
author | Roland Dreier <roland@purestorage.com> | 2012-07-16 14:04:41 -0400 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2012-07-16 20:35:27 -0400 |
commit | e1013f14376f3121e73917f5455b9b7a22bdfb41 (patch) | |
tree | 476afba53473e042fa974423ce348503b6175a9c /drivers/scsi/qla2xxx/qla_target.c | |
parent | bc187ea6c3b3d20bd190f3ee90c954aee0ce8aad (diff) |
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: Roland Dreier <roland@purestorage.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_target.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_target.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c index 87b5a330e0b..5b30132960c 100644 --- a/drivers/scsi/qla2xxx/qla_target.c +++ b/drivers/scsi/qla2xxx/qla_target.c | |||
@@ -2643,19 +2643,9 @@ static void qlt_do_work(struct work_struct *work) | |||
2643 | spin_lock_irqsave(&ha->hardware_lock, flags); | 2643 | spin_lock_irqsave(&ha->hardware_lock, flags); |
2644 | sess = ha->tgt.tgt_ops->find_sess_by_s_id(vha, | 2644 | sess = ha->tgt.tgt_ops->find_sess_by_s_id(vha, |
2645 | atio->u.isp24.fcp_hdr.s_id); | 2645 | atio->u.isp24.fcp_hdr.s_id); |
2646 | if (sess) { | 2646 | /* Do kref_get() before dropping qla_hw_data->hardware_lock. */ |
2647 | if (unlikely(sess->se_sess->sess_tearing_down)) { | 2647 | if (sess) |
2648 | sess = NULL; | 2648 | kref_get(&sess->se_sess->sess_kref); |
2649 | spin_unlock_irqrestore(&ha->hardware_lock, flags); | ||
2650 | goto out_term; | ||
2651 | } else { | ||
2652 | /* | ||
2653 | * Do the extra kref_get() before dropping | ||
2654 | * qla_hw_data->hardware_lock. | ||
2655 | */ | ||
2656 | kref_get(&sess->se_sess->sess_kref); | ||
2657 | } | ||
2658 | } | ||
2659 | spin_unlock_irqrestore(&ha->hardware_lock, flags); | 2649 | spin_unlock_irqrestore(&ha->hardware_lock, flags); |
2660 | 2650 | ||
2661 | if (unlikely(!sess)) { | 2651 | if (unlikely(!sess)) { |