From 01468346546a9bcc09035a7e8b71f78af5b7133a Mon Sep 17 00:00:00 2001 From: Nicholas Bellinger Date: Sat, 10 Mar 2012 14:32:52 -0800 Subject: target: Add se_node_acl->acl_free_comp for NodeACL release path Add se_node_acl->acl_free_comp for NodeACL release path to wait for outstanding fabric session shutdown to complete in transport_deregister_session() before finishing NodeACL release from configfs process context. Also make transport_deregister_session() clear the comp_nacl bit to skip se_node_acl->acl_free_comp completion for dynamically generated NodeACL during fabric session shutdown. Cc: Roland Dreier Cc: Christoph Hellwig Cc: Joern Engel Cc: Andy Grover Signed-off-by: Nicholas Bellinger --- drivers/target/target_core_tpg.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/target/target_core_tpg.c') diff --git a/drivers/target/target_core_tpg.c b/drivers/target/target_core_tpg.c index 32153404da14..9cdfd061eacf 100644 --- a/drivers/target/target_core_tpg.c +++ b/drivers/target/target_core_tpg.c @@ -274,6 +274,7 @@ struct se_node_acl *core_tpg_check_initiator_node_acl( INIT_LIST_HEAD(&acl->acl_list); INIT_LIST_HEAD(&acl->acl_sess_list); + init_completion(&acl->acl_free_comp); spin_lock_init(&acl->device_list_lock); spin_lock_init(&acl->nacl_sess_lock); atomic_set(&acl->acl_pr_ref_count, 0); @@ -402,6 +403,7 @@ struct se_node_acl *core_tpg_add_initiator_node_acl( INIT_LIST_HEAD(&acl->acl_list); INIT_LIST_HEAD(&acl->acl_sess_list); + init_completion(&acl->acl_free_comp); spin_lock_init(&acl->device_list_lock); spin_lock_init(&acl->nacl_sess_lock); atomic_set(&acl->acl_pr_ref_count, 0); -- cgit v1.2.3