summaryrefslogtreecommitdiff
path: root/include/target
diff options
context:
space:
mode:
authorNicholas Bellinger <nab@linux-iscsi.org>2012-03-09 11:45:02 +0400
committerNicholas Bellinger <nab@linux-iscsi.org>2012-03-11 02:42:09 +0400
commitafb999ffc48f5e7ec18e6f8f9e68aa3d0085862d (patch)
tree781a1055eaed8bef8148c95fa6f9e779484511c6 /include/target
parent01468346546a9bcc09035a7e8b71f78af5b7133a (diff)
downloadlinux-afb999ffc48f5e7ec18e6f8f9e68aa3d0085862d.tar.xz
target: Add se_node_acl->acl_kref for ->acl_free_comp usage
This patch adds se_node_acl->acl_kref for use with ->acl_free_comp during explict se_node_acl release. It adds kref_init() during se_node_acl setup, kref_get() during __transport_register_session() -> target_put_nacl() with existing transport_deregister_session() fabric callback usage. It also moves transport_free_session() to release *se_sess memory after target_put_nacl() execution in transport_deregister_session() Cc: Roland Dreier <roland@purestorage.com> Cc: Christoph Hellwig <hch@lst.de> Cc: Joern Engel <joern@logfs.org> Cc: Andy Grover <agrover@redhat.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'include/target')
-rw-r--r--include/target/target_core_base.h1
-rw-r--r--include/target/target_core_fabric.h1
2 files changed, 2 insertions, 0 deletions
diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h
index f8aa300b0d25..2cda5638a4cc 100644
--- a/include/target/target_core_base.h
+++ b/include/target/target_core_base.h
@@ -642,6 +642,7 @@ struct se_node_acl {
struct list_head acl_list;
struct list_head acl_sess_list;
struct completion acl_free_comp;
+ struct kref acl_kref;
};
struct se_session {
diff --git a/include/target/target_core_fabric.h b/include/target/target_core_fabric.h
index 7e76aa167009..032c48753cfa 100644
--- a/include/target/target_core_fabric.h
+++ b/include/target/target_core_fabric.h
@@ -108,6 +108,7 @@ void transport_register_session(struct se_portal_group *,
void target_get_session(struct se_session *);
int target_put_session(struct se_session *);
void transport_free_session(struct se_session *);
+void target_put_nacl(struct se_node_acl *);
void transport_deregister_session_configfs(struct se_session *);
void transport_deregister_session(struct se_session *);