summaryrefslogtreecommitdiffstats
path: root/drivers/target/target_core_tpg.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2016-05-02 15:45:25 +0200
committerNicholas Bellinger <nab@linux-iscsi.org>2016-05-10 01:19:49 -0700
commitd94331fab6d4d48280a5cea646352db90777966d (patch)
tree8d4814eb16f6708d70113a4701253c502b7ab71a /drivers/target/target_core_tpg.c
parent44f33d0fb5a7181cc34529c211d7b5039d8a0a4b (diff)
downloadtalos-obmc-linux-d94331fab6d4d48280a5cea646352db90777966d.tar.gz
talos-obmc-linux-d94331fab6d4d48280a5cea646352db90777966d.zip
target: remove sess_kref and ->shutdown_session
Both of them are unused now that drivers handle any delayed session shutdown internally. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/target_core_tpg.c')
-rw-r--r--drivers/target/target_core_tpg.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/drivers/target/target_core_tpg.c b/drivers/target/target_core_tpg.c
index a81a37045403..d99752c6cd60 100644
--- a/drivers/target/target_core_tpg.c
+++ b/drivers/target/target_core_tpg.c
@@ -340,26 +340,18 @@ static void target_shutdown_sessions(struct se_node_acl *acl)
{
struct se_session *sess;
unsigned long flags;
- int ret;
restart:
spin_lock_irqsave(&acl->nacl_sess_lock, flags);
list_for_each_entry(sess, &acl->acl_sess_list, sess_acl_list) {
if (sess->sess_tearing_down)
continue;
- if (!target_get_session(sess))
- continue;
list_del_init(&sess->sess_acl_list);
-
spin_unlock_irqrestore(&acl->nacl_sess_lock, flags);
- if (acl->se_tpg->se_tpg_tfo->shutdown_session)
- ret = acl->se_tpg->se_tpg_tfo->shutdown_session(sess);
- else
- ret = 1;
- target_put_session(sess);
- if (ret)
- target_put_session(sess);
+
+ if (acl->se_tpg->se_tpg_tfo->close_session)
+ acl->se_tpg->se_tpg_tfo->close_session(sess);
goto restart;
}
spin_unlock_irqrestore(&acl->nacl_sess_lock, flags);
OpenPOWER on IntegriCloud