]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
target: remove ->put_session method
authorChristoph Hellwig <hch@lst.de>
Sun, 3 May 2015 06:54:42 +0000 (08:54 +0200)
committerNicholas Bellinger <nab@linux-iscsi.org>
Sun, 31 May 2015 05:42:40 +0000 (22:42 -0700)
The only instance of ->put_session is in qla2xxx, and was added by commit
aaf68b ("tcm_qla2xxx: Convert to TFO->put_session() usage") with the following
description:

    This patch converts tcm_qla2xxx code to use an internal kref_put() for
    se_session->sess_kref in order to ensure that qla_hw_data->hardware_lock
    can be held while calling qlt_unreg_sess() for the final put.

But these day we're already holding the hardware lock over qlt_unreg_sess in
the ->close_session callback, so we're fine without this method.

(Re-add missing tcm_qla2xxx_release_session + drop put_session usage - nab)

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/scsi/qla2xxx/tcm_qla2xxx.c
drivers/target/target_core_transport.c
drivers/xen/xen-scsiback.c
include/target/target_core_fabric.h

index b505e5e7c98736cf3697cbf561b2930df73d79e1..cb53144c72d0998cc5a5d0c9a99ae5670392ceff 100644 (file)
@@ -700,17 +700,6 @@ static void tcm_qla2xxx_release_session(struct kref *kref)
        qlt_unreg_sess(se_sess->fabric_sess_ptr);
 }
 
-static void tcm_qla2xxx_put_session(struct se_session *se_sess)
-{
-       struct qla_tgt_sess *sess = se_sess->fabric_sess_ptr;
-       struct qla_hw_data *ha = sess->vha->hw;
-       unsigned long flags;
-
-       spin_lock_irqsave(&ha->hardware_lock, flags);
-       kref_put(&se_sess->sess_kref, tcm_qla2xxx_release_session);
-       spin_unlock_irqrestore(&ha->hardware_lock, flags);
-}
-
 static void tcm_qla2xxx_put_sess(struct qla_tgt_sess *sess)
 {
        if (!sess)
@@ -1843,7 +1832,6 @@ static const struct target_core_fabric_ops tcm_qla2xxx_ops = {
        .tpg_get_inst_index             = tcm_qla2xxx_tpg_get_inst_index,
        .check_stop_free                = tcm_qla2xxx_check_stop_free,
        .release_cmd                    = tcm_qla2xxx_release_cmd,
-       .put_session                    = tcm_qla2xxx_put_session,
        .shutdown_session               = tcm_qla2xxx_shutdown_session,
        .close_session                  = tcm_qla2xxx_close_session,
        .sess_get_index                 = tcm_qla2xxx_sess_get_index,
@@ -1887,7 +1875,6 @@ static const struct target_core_fabric_ops tcm_qla2xxx_npiv_ops = {
        .tpg_get_inst_index             = tcm_qla2xxx_tpg_get_inst_index,
        .check_stop_free                = tcm_qla2xxx_check_stop_free,
        .release_cmd                    = tcm_qla2xxx_release_cmd,
-       .put_session                    = tcm_qla2xxx_put_session,
        .shutdown_session               = tcm_qla2xxx_shutdown_session,
        .close_session                  = tcm_qla2xxx_close_session,
        .sess_get_index                 = tcm_qla2xxx_sess_get_index,
index fc460f1b0b751b04118c76daa5c9ac335011c469..3c2809cd8b5b505f7fc8f0ab1b57df63f0c795df 100644 (file)
@@ -409,12 +409,6 @@ EXPORT_SYMBOL(target_get_session);
 
 void target_put_session(struct se_session *se_sess)
 {
-       struct se_portal_group *tpg = se_sess->se_tpg;
-
-       if (tpg->se_tpg_tfo->put_session != NULL) {
-               tpg->se_tpg_tfo->put_session(se_sess);
-               return;
-       }
        kref_put(&se_sess->sess_kref, target_release_session);
 }
 EXPORT_SYMBOL(target_put_session);
index edd0379c06b9c1d15429a4bb32c1d9dc1b78746f..8b7dd47abd8d9ca697f0772182d02716b207b3bd 100644 (file)
@@ -1817,7 +1817,6 @@ static const struct target_core_fabric_ops scsiback_ops = {
        .tpg_get_inst_index             = scsiback_tpg_get_inst_index,
        .check_stop_free                = scsiback_check_stop_free,
        .release_cmd                    = scsiback_release_cmd,
-       .put_session                    = NULL,
        .shutdown_session               = scsiback_shutdown_session,
        .close_session                  = scsiback_close_session,
        .sess_get_index                 = scsiback_sess_get_index,
index f64d493f888b642fd75b54df730247578f3a15d4..55654c90350d104d4a3a372850acb2637e5b6749 100644 (file)
@@ -37,7 +37,6 @@ struct target_core_fabric_ops {
         */
        int (*check_stop_free)(struct se_cmd *);
        void (*release_cmd)(struct se_cmd *);
-       void (*put_session)(struct se_session *);
        /*
         * Called with spin_lock_bh(struct se_portal_group->session_lock held.
         */