summaryrefslogtreecommitdiffstats
path: root/drivers/target/target_core_tpg.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2015-04-13 19:51:16 +0200
committerNicholas Bellinger <nab@linux-iscsi.org>2015-05-30 22:42:23 -0700
commit144bc4c2a42a0f42a32c106d53f5bf2724fbf098 (patch)
tree1b1a1a6b0dabea88e6dcef368305c6bac3c33648 /drivers/target/target_core_tpg.c
parente413f4727037e826c55a639c713a221006b6d61d (diff)
downloadlinux-144bc4c2a42a0f42a32c106d53f5bf2724fbf098.tar.bz2
target: move node ACL allocation to core code
Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/target_core_tpg.c')
-rw-r--r--drivers/target/target_core_tpg.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/target/target_core_tpg.c b/drivers/target/target_core_tpg.c
index 0cd86ff9a792..42f3bd9561c8 100644
--- a/drivers/target/target_core_tpg.c
+++ b/drivers/target/target_core_tpg.c
@@ -259,7 +259,8 @@ static struct se_node_acl *target_alloc_node_acl(struct se_portal_group *tpg,
{
struct se_node_acl *acl;
- acl = tpg->se_tpg_tfo->tpg_alloc_fabric_acl(tpg);
+ acl = kzalloc(max(sizeof(*acl), tpg->se_tpg_tfo->node_acl_size),
+ GFP_KERNEL);
if (!acl)
return NULL;
@@ -290,7 +291,7 @@ static struct se_node_acl *target_alloc_node_acl(struct se_portal_group *tpg,
out_free_device_list:
core_free_device_list_for_node(acl, tpg);
out_free_acl:
- tpg->se_tpg_tfo->tpg_release_fabric_acl(tpg, acl);
+ kfree(acl);
return NULL;
}
@@ -461,7 +462,7 @@ void core_tpg_del_initiator_node_acl(struct se_node_acl *acl)
tpg->se_tpg_tfo->tpg_get_tag(tpg), acl->queue_depth,
tpg->se_tpg_tfo->get_fabric_name(), acl->initiatorname);
- tpg->se_tpg_tfo->tpg_release_fabric_acl(tpg, acl);
+ kfree(acl);
}
/* core_tpg_set_initiator_node_queue_depth():
@@ -725,7 +726,7 @@ int core_tpg_deregister(struct se_portal_group *se_tpg)
core_tpg_wait_for_nacl_pr_ref(nacl);
core_free_device_list_for_node(nacl, se_tpg);
- se_tpg->se_tpg_tfo->tpg_release_fabric_acl(se_tpg, nacl);
+ kfree(nacl);
spin_lock_irq(&se_tpg->acl_node_lock);
}