aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorRoland Dreier <roland@purestorage.com>2012-07-16 14:04:36 -0400
committerNicholas Bellinger <nab@linux-iscsi.org>2012-07-16 20:35:25 -0400
commitb46e34a6721cb057702f19ebe27cfc7877e500e5 (patch)
treedebc4d50a02a41ef33fe73a87aad3ddd68a9d835 /drivers/scsi
parent77d4c7450646e6bcba3ff6de17aa4b98c34fe849 (diff)
qla2xxx: Get rid of redundant qla_tgt_sess.tearing_down
The only place that sets qla_tgt_sess.tearing_down calls target_splice_sess_cmd_list() immediately afterwards, without dropping the lock it holds. That function sets se_session.sess_tearing_down, so we can get rid of the qla_target-specific flag, and in the one place that looks at the qla_tgt_sess.tearing_down flag just test se_session.sess_tearing_down instead. 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')
-rw-r--r--drivers/scsi/qla2xxx/qla_target.c2
-rw-r--r--drivers/scsi/qla2xxx/qla_target.h1
-rw-r--r--drivers/scsi/qla2xxx/tcm_qla2xxx.c1
3 files changed, 1 insertions, 3 deletions
diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c
index 77759c78cc21..87b5a330e0bf 100644
--- a/drivers/scsi/qla2xxx/qla_target.c
+++ b/drivers/scsi/qla2xxx/qla_target.c
@@ -2644,7 +2644,7 @@ static void qlt_do_work(struct work_struct *work)
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 if (sess) {
2647 if (unlikely(sess->tearing_down)) { 2647 if (unlikely(sess->se_sess->sess_tearing_down)) {
2648 sess = NULL; 2648 sess = NULL;
2649 spin_unlock_irqrestore(&ha->hardware_lock, flags); 2649 spin_unlock_irqrestore(&ha->hardware_lock, flags);
2650 goto out_term; 2650 goto out_term;
diff --git a/drivers/scsi/qla2xxx/qla_target.h b/drivers/scsi/qla2xxx/qla_target.h
index 2953db8b9da0..170af1571214 100644
--- a/drivers/scsi/qla2xxx/qla_target.h
+++ b/drivers/scsi/qla2xxx/qla_target.h
@@ -813,7 +813,6 @@ struct qla_tgt_sess {
813 unsigned int conf_compl_supported:1; 813 unsigned int conf_compl_supported:1;
814 unsigned int deleted:1; 814 unsigned int deleted:1;
815 unsigned int local:1; 815 unsigned int local:1;
816 unsigned int tearing_down:1;
817 816
818 struct se_session *se_sess; 817 struct se_session *se_sess;
819 struct scsi_qla_host *vha; 818 struct scsi_qla_host *vha;
diff --git a/drivers/scsi/qla2xxx/tcm_qla2xxx.c b/drivers/scsi/qla2xxx/tcm_qla2xxx.c
index d85a81776a78..e131d689e573 100644
--- a/drivers/scsi/qla2xxx/tcm_qla2xxx.c
+++ b/drivers/scsi/qla2xxx/tcm_qla2xxx.c
@@ -464,7 +464,6 @@ static int tcm_qla2xxx_shutdown_session(struct se_session *se_sess)
464 vha = sess->vha; 464 vha = sess->vha;
465 465
466 spin_lock_irqsave(&vha->hw->hardware_lock, flags); 466 spin_lock_irqsave(&vha->hw->hardware_lock, flags);
467 sess->tearing_down = 1;
468 target_splice_sess_cmd_list(se_sess); 467 target_splice_sess_cmd_list(se_sess);
469 spin_unlock_irqrestore(&vha->hw->hardware_lock, flags); 468 spin_unlock_irqrestore(&vha->hw->hardware_lock, flags);
470 469