From 41ac82b668177876d5965d5f60956fb0fbcdb514 Mon Sep 17 00:00:00 2001 From: Nicholas Bellinger Date: Sun, 26 Feb 2012 22:22:10 -0800 Subject: target: Add se_sess->sess_kref + get/put helpers This patch adds basic se_session->sess_kref and get/put helpers for fabric session reference counting. It sets the initial kref in transport_init_session() and adds a target_release_session() callback to invoke TFO->close_session() for final session shutdown. Cc: Roland Dreier Cc: Christoph Hellwig Cc: Joern Engel Cc: Andy Grover Signed-off-by: Nicholas Bellinger --- include/target/target_core_fabric.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/target/target_core_fabric.h') diff --git a/include/target/target_core_fabric.h b/include/target/target_core_fabric.h index e5d8c47..7e76aa1 100644 --- a/include/target/target_core_fabric.h +++ b/include/target/target_core_fabric.h @@ -105,6 +105,8 @@ void __transport_register_session(struct se_portal_group *, struct se_node_acl *, struct se_session *, void *); void transport_register_session(struct se_portal_group *, struct se_node_acl *, struct se_session *, void *); +void target_get_session(struct se_session *); +int target_put_session(struct se_session *); void transport_free_session(struct se_session *); void transport_deregister_session_configfs(struct se_session *); void transport_deregister_session(struct se_session *); -- cgit v1.1