Skip to contentSkip to conversation

tcm: Remove struct list_head lookup from core_dev_[add,del]_initiator_node_lun_acl()

PATCH New Nicholas A. Bellinger 1 participant 1 message Sep 22, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 2/2 tcm: Remove struct list_head lookup from core_dev_[add,del]_initiator_node_lun_acl()

From: Nicholas Bellinger <[email protected]>

This patch removes the usage of core_tpg_get_initiator_node_acl() that contains an unnecessary lookup of struct se_node_acl from struct se_portal_group->acl_node_list which can be located directly via struct se_lun_acl->se_lun_nacl.

---
 drivers/target/target_core_device.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/target/target_core_device.c +2 -2
index 6fe4408..1e8be47 100644
@@ -1524,7 +1524,7 @@ int core_dev_add_initiator_node_lun_acl(
 		return -EINVAL;
 	}
 
-	nacl = core_tpg_get_initiator_node_acl(tpg, lacl->initiatorname);
+	nacl = lacl->se_lun_nacl;
 	if (!(nacl))
 		return -EINVAL;
 
@@ -1569,7 +1569,7 @@ int core_dev_del_initiator_node_lun_acl(
 {
 	struct se_node_acl *nacl;
 
-	nacl = core_tpg_get_initiator_node_acl(tpg, lacl->initiatorname);
+	nacl = lacl->se_lun_nacl;
 	if (!(nacl))
 		return -EINVAL;
 
Signature · 1 line
1.5.6.5