Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 263304
b: refs/heads/master
c: e63a8e1
h: refs/heads/master
v: v3
  • Loading branch information
Roland Dreier authored and Nicholas Bellinger committed Aug 22, 2011
1 parent 77133c2 commit 130a9b4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4e0f05297ff615a9a4e269da301ff77f660a3ab0
refs/heads/master: e63a8e1933a2218cf801e46dd01bd8cca4a555ec
13 changes: 7 additions & 6 deletions trunk/drivers/target/target_core_transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -389,40 +389,41 @@ void transport_deregister_session(struct se_session *se_sess)
{
struct se_portal_group *se_tpg = se_sess->se_tpg;
struct se_node_acl *se_nacl;
unsigned long flags;

if (!se_tpg) {
transport_free_session(se_sess);
return;
}

spin_lock_bh(&se_tpg->session_lock);
spin_lock_irqsave(&se_tpg->session_lock, flags);
list_del(&se_sess->sess_list);
se_sess->se_tpg = NULL;
se_sess->fabric_sess_ptr = NULL;
spin_unlock_bh(&se_tpg->session_lock);
spin_unlock_irqrestore(&se_tpg->session_lock, flags);

/*
* Determine if we need to do extra work for this initiator node's
* struct se_node_acl if it had been previously dynamically generated.
*/
se_nacl = se_sess->se_node_acl;
if (se_nacl) {
spin_lock_bh(&se_tpg->acl_node_lock);
spin_lock_irqsave(&se_tpg->acl_node_lock, flags);
if (se_nacl->dynamic_node_acl) {
if (!se_tpg->se_tpg_tfo->tpg_check_demo_mode_cache(
se_tpg)) {
list_del(&se_nacl->acl_list);
se_tpg->num_node_acls--;
spin_unlock_bh(&se_tpg->acl_node_lock);
spin_unlock_irqrestore(&se_tpg->acl_node_lock, flags);

core_tpg_wait_for_nacl_pr_ref(se_nacl);
core_free_device_list_for_node(se_nacl, se_tpg);
se_tpg->se_tpg_tfo->tpg_release_fabric_acl(se_tpg,
se_nacl);
spin_lock_bh(&se_tpg->acl_node_lock);
spin_lock_irqsave(&se_tpg->acl_node_lock, flags);
}
}
spin_unlock_bh(&se_tpg->acl_node_lock);
spin_unlock_irqrestore(&se_tpg->acl_node_lock, flags);
}

transport_free_session(se_sess);
Expand Down

0 comments on commit 130a9b4

Please sign in to comment.