diff options
author | Christoph Hellwig <hch@lst.de> | 2016-05-02 15:45:25 +0200 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2016-05-10 01:19:49 -0700 |
commit | d94331fab6d4d48280a5cea646352db90777966d (patch) | |
tree | 8d4814eb16f6708d70113a4701253c502b7ab71a /drivers/target/target_core_transport.c | |
parent | 44f33d0fb5a7181cc34529c211d7b5039d8a0a4b (diff) | |
download | linux-stable-d94331fab6d4d48280a5cea646352db90777966d.tar.gz linux-stable-d94331fab6d4d48280a5cea646352db90777966d.tar.bz2 linux-stable-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_transport.c')
-rw-r--r-- | drivers/target/target_core_transport.c | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c index 2914d4c68fea..6c089afe553a 100644 --- a/drivers/target/target_core_transport.c +++ b/drivers/target/target_core_transport.c @@ -239,7 +239,6 @@ struct se_session *transport_init_session(enum target_prot_op sup_prot_ops) INIT_LIST_HEAD(&se_sess->sess_cmd_list); INIT_LIST_HEAD(&se_sess->sess_wait_list); spin_lock_init(&se_sess->sess_cmd_lock); - kref_init(&se_sess->sess_kref); se_sess->sup_prot_ops = sup_prot_ops; return se_sess; @@ -430,28 +429,6 @@ target_alloc_session(struct se_portal_group *tpg, } EXPORT_SYMBOL(target_alloc_session); -static void target_release_session(struct kref *kref) -{ - struct se_session *se_sess = container_of(kref, - struct se_session, sess_kref); - struct se_portal_group *se_tpg = se_sess->se_tpg; - - if (se_tpg->se_tpg_tfo->close_session) - se_tpg->se_tpg_tfo->close_session(se_sess); -} - -int target_get_session(struct se_session *se_sess) -{ - return kref_get_unless_zero(&se_sess->sess_kref); -} -EXPORT_SYMBOL(target_get_session); - -void target_put_session(struct se_session *se_sess) -{ - kref_put(&se_sess->sess_kref, target_release_session); -} -EXPORT_SYMBOL(target_put_session); - ssize_t target_show_dynamic_sessions(struct se_portal_group *se_tpg, char *page) { struct se_session *se_sess; |