[PATCH 3/5] target: Drop unused TFO->sess_logged_in() API caller

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Nicholas Bellinger <nab@xxxxxxxxxxxxxxx>

This patch drops the unused TFO->sess_logged_in() API caller from
target-core and removes usage from lio-core.git fabric module code.

Signed-off-by: Nicholas Bellinger <nab@xxxxxxxxxxxxxxx>
---
 drivers/infiniband/ulp/srpt/ib_srpt.c         |    6 ------
 drivers/scsi/qla2xxx/tcm_qla2xxx.c            |    7 -------
 drivers/target/iscsi/iscsi_target_configfs.c  |   16 ----------------
 drivers/target/loopback/tcm_loop.c            |    9 ---------
 drivers/target/target_core_configfs.c         |    4 ----
 drivers/target/tcm_fc/tcm_fc.h                |    1 -
 drivers/target/tcm_fc/tfc_conf.c              |    1 -
 drivers/target/tcm_fc/tfc_sess.c              |    7 -------
 drivers/target/tcm_vhost/tcm_vhost_configfs.c |    1 -
 drivers/target/tcm_vhost/tcm_vhost_fabric.c   |    5 -----
 drivers/target/tcm_vhost/tcm_vhost_fabric.h   |    1 -
 drivers/target/usb-gadget/configfs.c          |    1 -
 drivers/target/usb-gadget/fabric.c            |    5 -----
 drivers/target/usb-gadget/usbg.h              |    1 -
 include/target/target_core_fabric.h           |    1 -
 15 files changed, 0 insertions(+), 66 deletions(-)

diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c b/drivers/infiniband/ulp/srpt/ib_srpt.c
index bdd2a21..08a5cda 100644
--- a/drivers/infiniband/ulp/srpt/ib_srpt.c
+++ b/drivers/infiniband/ulp/srpt/ib_srpt.c
@@ -3462,11 +3462,6 @@ static void srpt_close_session(struct se_session *se_sess)
 	WARN_ON(res <= 0);
 }
 
-static int srpt_sess_logged_in(struct se_session *se_sess)
-{
-	return true;
-}
-
 /**
  * srpt_sess_get_index() - Return the value of scsiAttIntrPortIndex (SCSI-MIB).
  *
@@ -3883,7 +3878,6 @@ static struct target_core_fabric_ops srpt_template = {
 	.check_stop_free		= srpt_check_stop_free,
 	.shutdown_session		= srpt_shutdown_session,
 	.close_session			= srpt_close_session,
-	.sess_logged_in			= srpt_sess_logged_in,
 	.sess_get_index			= srpt_sess_get_index,
 	.sess_get_initiator_sid		= NULL,
 	.write_pending			= srpt_write_pending,
diff --git a/drivers/scsi/qla2xxx/tcm_qla2xxx.c b/drivers/scsi/qla2xxx/tcm_qla2xxx.c
index 8e7719b..8d7732f 100644
--- a/drivers/scsi/qla2xxx/tcm_qla2xxx.c
+++ b/drivers/scsi/qla2xxx/tcm_qla2xxx.c
@@ -462,11 +462,6 @@ void tcm_qla2xxx_close_session(struct se_session *se_sess)
 	spin_unlock_irqrestore(&vha->hw->hardware_lock, flags);
 }
 
-int tcm_qla2xxx_sess_logged_in(struct se_session *se_sess)
-{
-	return 0;
-}
-
 u32 tcm_qla2xxx_sess_get_index(struct se_session *se_sess)
 {
 	return 0;
@@ -1746,7 +1741,6 @@ static struct target_core_fabric_ops tcm_qla2xxx_ops = {
 	.release_cmd			= tcm_qla2xxx_release_cmd,
 	.shutdown_session		= tcm_qla2xxx_shutdown_session,
 	.close_session			= tcm_qla2xxx_close_session,
-	.sess_logged_in			= tcm_qla2xxx_sess_logged_in,
 	.sess_get_index			= tcm_qla2xxx_sess_get_index,
 	.sess_get_initiator_sid		= NULL,
 	.write_pending			= tcm_qla2xxx_write_pending,
@@ -1795,7 +1789,6 @@ static struct target_core_fabric_ops tcm_qla2xxx_npiv_ops = {
 	.release_cmd			= tcm_qla2xxx_release_cmd,
 	.shutdown_session		= tcm_qla2xxx_shutdown_session,
 	.close_session			= tcm_qla2xxx_close_session,
-	.sess_logged_in			= tcm_qla2xxx_sess_logged_in,
 	.sess_get_index			= tcm_qla2xxx_sess_get_index,
 	.sess_get_initiator_sid		= NULL,
 	.write_pending			= tcm_qla2xxx_write_pending,
diff --git a/drivers/target/iscsi/iscsi_target_configfs.c b/drivers/target/iscsi/iscsi_target_configfs.c
index daeb5a2..d19704b 100644
--- a/drivers/target/iscsi/iscsi_target_configfs.c
+++ b/drivers/target/iscsi/iscsi_target_configfs.c
@@ -1510,21 +1510,6 @@ static int iscsi_is_state_remove(struct se_cmd *se_cmd)
 	return (cmd->i_state == ISTATE_REMOVE);
 }
 
-static int lio_sess_logged_in(struct se_session *se_sess)
-{
-	struct iscsi_session *sess = se_sess->fabric_sess_ptr;
-	int ret;
-	/*
-	 * Called with spin_lock_bh(&tpg_lock); and
-	 * spin_lock(&se_tpg->session_lock); held.
-	 */
-	spin_lock(&sess->conn_lock);
-	ret = (sess->session_state != TARG_SESS_STATE_LOGGED_IN);
-	spin_unlock(&sess->conn_lock);
-
-	return ret;
-}
-
 static u32 lio_sess_get_index(struct se_session *se_sess)
 {
 	struct iscsi_session *sess = se_sess->fabric_sess_ptr;
@@ -1781,7 +1766,6 @@ int iscsi_target_register_configfs(void)
 	fabric->tf_ops.release_cmd = &lio_release_cmd;
 	fabric->tf_ops.shutdown_session = &lio_tpg_shutdown_session;
 	fabric->tf_ops.close_session = &lio_tpg_close_session;
-	fabric->tf_ops.sess_logged_in = &lio_sess_logged_in;
 	fabric->tf_ops.sess_get_index = &lio_sess_get_index;
 	fabric->tf_ops.sess_get_initiator_sid = &lio_sess_get_initiator_sid;
 	fabric->tf_ops.write_pending = &lio_write_pending;
diff --git a/drivers/target/loopback/tcm_loop.c b/drivers/target/loopback/tcm_loop.c
index f85fbbd..7b1ebce 100644
--- a/drivers/target/loopback/tcm_loop.c
+++ b/drivers/target/loopback/tcm_loop.c
@@ -744,14 +744,6 @@ static int tcm_loop_is_state_remove(struct se_cmd *se_cmd)
 	return 0;
 }
 
-static int tcm_loop_sess_logged_in(struct se_session *se_sess)
-{
-	/*
-	 * Assume that TL Nexus is always active
-	 */
-	return 1;
-}
-
 static u32 tcm_loop_sess_get_index(struct se_session *se_sess)
 {
 	return 1;
@@ -1378,7 +1370,6 @@ static int tcm_loop_register_configfs(void)
 	fabric->tf_ops.release_cmd = &tcm_loop_release_cmd;
 	fabric->tf_ops.shutdown_session = &tcm_loop_shutdown_session;
 	fabric->tf_ops.close_session = &tcm_loop_close_session;
-	fabric->tf_ops.sess_logged_in = &tcm_loop_sess_logged_in;
 	fabric->tf_ops.sess_get_index = &tcm_loop_sess_get_index;
 	fabric->tf_ops.sess_get_initiator_sid = NULL;
 	fabric->tf_ops.write_pending = &tcm_loop_write_pending;
diff --git a/drivers/target/target_core_configfs.c b/drivers/target/target_core_configfs.c
index 917c38a..24e0529 100644
--- a/drivers/target/target_core_configfs.c
+++ b/drivers/target/target_core_configfs.c
@@ -421,10 +421,6 @@ static int target_fabric_tf_ops_check(
 		pr_err("Missing tfo->close_session()\n");
 		return -EINVAL;
 	}
-	if (!tfo->sess_logged_in) {
-		pr_err("Missing tfo->sess_logged_in()\n");
-		return -EINVAL;
-	}
 	if (!tfo->sess_get_index) {
 		pr_err("Missing tfo->sess_get_index()\n");
 		return -EINVAL;
diff --git a/drivers/target/tcm_fc/tcm_fc.h b/drivers/target/tcm_fc/tcm_fc.h
index 9832889..738d018 100644
--- a/drivers/target/tcm_fc/tcm_fc.h
+++ b/drivers/target/tcm_fc/tcm_fc.h
@@ -141,7 +141,6 @@ extern struct target_fabric_configfs *ft_configfs;
 void ft_sess_put(struct ft_sess *);
 int ft_sess_shutdown(struct se_session *);
 void ft_sess_close(struct se_session *);
-int ft_sess_logged_in(struct se_session *);
 u32 ft_sess_get_index(struct se_session *);
 u32 ft_sess_get_port_name(struct se_session *, unsigned char *, u32);
 
diff --git a/drivers/target/tcm_fc/tfc_conf.c b/drivers/target/tcm_fc/tfc_conf.c
index 71ee820..ff1c316 100644
--- a/drivers/target/tcm_fc/tfc_conf.c
+++ b/drivers/target/tcm_fc/tfc_conf.c
@@ -529,7 +529,6 @@ static struct target_core_fabric_ops ft_fabric_ops = {
 	.release_cmd =			ft_release_cmd,
 	.shutdown_session =		ft_sess_shutdown,
 	.close_session =		ft_sess_close,
-	.sess_logged_in =		ft_sess_logged_in,
 	.sess_get_index =		ft_sess_get_index,
 	.sess_get_initiator_sid =	NULL,
 	.write_pending =		ft_write_pending,
diff --git a/drivers/target/tcm_fc/tfc_sess.c b/drivers/target/tcm_fc/tfc_sess.c
index 08e0f49..ddb8b28 100644
--- a/drivers/target/tcm_fc/tfc_sess.c
+++ b/drivers/target/tcm_fc/tfc_sess.c
@@ -328,13 +328,6 @@ void ft_sess_close(struct se_session *se_sess)
 	synchronize_rcu();		/* let transport deregister happen */
 }
 
-int ft_sess_logged_in(struct se_session *se_sess)
-{
-	struct ft_sess *sess = se_sess->fabric_sess_ptr;
-
-	return sess->port_id != -1;
-}
-
 u32 ft_sess_get_index(struct se_session *se_sess)
 {
 	struct ft_sess *sess = se_sess->fabric_sess_ptr;
diff --git a/drivers/target/tcm_vhost/tcm_vhost_configfs.c b/drivers/target/tcm_vhost/tcm_vhost_configfs.c
index 86fda5a..aded90e 100644
--- a/drivers/target/tcm_vhost/tcm_vhost_configfs.c
+++ b/drivers/target/tcm_vhost/tcm_vhost_configfs.c
@@ -518,7 +518,6 @@ static struct target_core_fabric_ops tcm_vhost_ops = {
 	.release_cmd			= tcm_vhost_release_cmd,
 	.shutdown_session		= tcm_vhost_shutdown_session,
 	.close_session			= tcm_vhost_close_session,
-	.sess_logged_in			= tcm_vhost_sess_logged_in,
 	.sess_get_index			= tcm_vhost_sess_get_index,
 	.sess_get_initiator_sid		= NULL,
 	.write_pending			= tcm_vhost_write_pending,
diff --git a/drivers/target/tcm_vhost/tcm_vhost_fabric.c b/drivers/target/tcm_vhost/tcm_vhost_fabric.c
index e38fa60..f9275cf 100644
--- a/drivers/target/tcm_vhost/tcm_vhost_fabric.c
+++ b/drivers/target/tcm_vhost/tcm_vhost_fabric.c
@@ -283,11 +283,6 @@ void tcm_vhost_close_session(struct se_session *se_sess)
 	return;
 }
 
-int tcm_vhost_sess_logged_in(struct se_session *se_sess)
-{
-	return 0;
-}
-
 u32 tcm_vhost_sess_get_index(struct se_session *se_sess)
 {
 	return 0;
diff --git a/drivers/target/tcm_vhost/tcm_vhost_fabric.h b/drivers/target/tcm_vhost/tcm_vhost_fabric.h
index f6a2ac0..fddcd43 100644
--- a/drivers/target/tcm_vhost/tcm_vhost_fabric.h
+++ b/drivers/target/tcm_vhost/tcm_vhost_fabric.h
@@ -21,7 +21,6 @@ int tcm_vhost_new_cmd_map(struct se_cmd *);
 void tcm_vhost_release_cmd(struct se_cmd *);
 int tcm_vhost_shutdown_session(struct se_session *);
 void tcm_vhost_close_session(struct se_session *);
-int tcm_vhost_sess_logged_in(struct se_session *);
 u32 tcm_vhost_sess_get_index(struct se_session *);
 int tcm_vhost_write_pending(struct se_cmd *);
 int tcm_vhost_write_pending_status(struct se_cmd *);
diff --git a/drivers/target/usb-gadget/configfs.c b/drivers/target/usb-gadget/configfs.c
index 63d4f44..1f3349a2 100644
--- a/drivers/target/usb-gadget/configfs.c
+++ b/drivers/target/usb-gadget/configfs.c
@@ -440,7 +440,6 @@ static struct target_core_fabric_ops usbg_ops = {
 	.release_cmd			= usbg_release_cmd,
 	.shutdown_session		= usbg_shutdown_session,
 	.close_session			= usbg_close_session,
-	.sess_logged_in			= usbg_sess_logged_in,
 	.sess_get_index			= usbg_sess_get_index,
 	.sess_get_initiator_sid		= NULL,
 	.write_pending			= usbg_send_write_request,
diff --git a/drivers/target/usb-gadget/fabric.c b/drivers/target/usb-gadget/fabric.c
index 2a50282..8032436 100644
--- a/drivers/target/usb-gadget/fabric.c
+++ b/drivers/target/usb-gadget/fabric.c
@@ -571,11 +571,6 @@ void usbg_stop_session(struct se_session *se_sess, int sess_sleep,
 	return;
 }
 
-int usbg_sess_logged_in(struct se_session *se_sess)
-{
-	return 0;
-}
-
 u32 usbg_sess_get_index(struct se_session *se_sess)
 {
 	return 0;
diff --git a/drivers/target/usb-gadget/usbg.h b/drivers/target/usb-gadget/usbg.h
index fcaf0d7..353ba2b 100644
--- a/drivers/target/usb-gadget/usbg.h
+++ b/drivers/target/usb-gadget/usbg.h
@@ -193,7 +193,6 @@ int usbg_cmd_queue_supported(struct se_cmd *se_cmd);
 void usbg_release_cmd(struct se_cmd *);
 int usbg_shutdown_session(struct se_session *);
 void usbg_close_session(struct se_session *);
-int usbg_sess_logged_in(struct se_session *);
 u32 usbg_sess_get_index(struct se_session *);
 int usbg_write_pending(struct se_cmd *);
 int usbg_write_pending_status(struct se_cmd *);
diff --git a/include/target/target_core_fabric.h b/include/target/target_core_fabric.h
index 9b44834..432bef4 100644
--- a/include/target/target_core_fabric.h
+++ b/include/target/target_core_fabric.h
@@ -62,7 +62,6 @@ struct target_core_fabric_ops {
 	 */
 	int (*shutdown_session)(struct se_session *);
 	void (*close_session)(struct se_session *);
-	int (*sess_logged_in)(struct se_session *);
 	u32 (*sess_get_index)(struct se_session *);
 	/*
 	 * Used only for SCSI fabrics that contain multi-value TransportIDs
-- 
1.7.2.5

--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux