summaryrefslogtreecommitdiffstats
path: root/drivers/target/tcm_fc/tfc_conf.c
diff options
context:
space:
mode:
authorNicholas Bellinger <nab@linux-iscsi.org>2016-01-07 22:17:16 -0800
committerNicholas Bellinger <nab@linux-iscsi.org>2016-01-12 23:17:51 -0800
commit7fbef3d0c2f6063ed12e7f3d74ba2a49111154f9 (patch)
treec80ab6948b21393c2e03239e913ecc2b601acda3 /drivers/target/tcm_fc/tfc_conf.c
parentde7ee9a20c7f617cbc5091e84855afcdeb19ba60 (diff)
downloadop-kernel-dev-7fbef3d0c2f6063ed12e7f3d74ba2a49111154f9.zip
op-kernel-dev-7fbef3d0c2f6063ed12e7f3d74ba2a49111154f9.tar.gz
tcm_fc: Convert acl lookup to modern get_initiator_node_acl usage
This patch does a simple conversion of tcm_fc code to use proper modern core_tpg_get_initiator_node_acl() lookup using se_node_acl->acl_kref, and drops the legacy list walk from ft_acl_get(). Note the original lookup also took node_name into account, but since ft_init_nodeacl() only ever sets port_name for se_node_acl->acl_group within configfs, this is purely a mechanical change. As per HCH, go ahead and fold ft_acl_get() into original caller. Cc: Vasu Dev <vasu.dev@linux.intel.com> Cc: Sagi Grimberg <sagig@mellanox.com> Cc: Christoph Hellwig <hch@lst.de> Cc: Hannes Reinecke <hare@suse.de> Cc: Andy Grover <agrover@redhat.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/tcm_fc/tfc_conf.c')
-rw-r--r--drivers/target/tcm_fc/tfc_conf.c25
1 files changed, 0 insertions, 25 deletions
diff --git a/drivers/target/tcm_fc/tfc_conf.c b/drivers/target/tcm_fc/tfc_conf.c
index 9cdb2ac..4d375e9 100644
--- a/drivers/target/tcm_fc/tfc_conf.c
+++ b/drivers/target/tcm_fc/tfc_conf.c
@@ -220,31 +220,6 @@ static int ft_init_nodeacl(struct se_node_acl *nacl, const char *name)
return 0;
}
-struct ft_node_acl *ft_acl_get(struct ft_tpg *tpg, struct fc_rport_priv *rdata)
-{
- struct ft_node_acl *found = NULL;
- struct ft_node_acl *acl;
- struct se_portal_group *se_tpg = &tpg->se_tpg;
- struct se_node_acl *se_acl;
-
- mutex_lock(&se_tpg->acl_node_mutex);
- list_for_each_entry(se_acl, &se_tpg->acl_node_list, acl_list) {
- acl = container_of(se_acl, struct ft_node_acl, se_node_acl);
- pr_debug("acl %p port_name %llx\n",
- acl, (unsigned long long)acl->node_auth.port_name);
- if (acl->node_auth.port_name == rdata->ids.port_name ||
- acl->node_auth.node_name == rdata->ids.node_name) {
- pr_debug("acl %p port_name %llx matched\n", acl,
- (unsigned long long)rdata->ids.port_name);
- found = acl;
- /* XXX need to hold onto ACL */
- break;
- }
- }
- mutex_unlock(&se_tpg->acl_node_mutex);
- return found;
-}
-
/*
* local_port port_group (tpg) ops.
*/
OpenPOWER on IntegriCloud