summaryrefslogtreecommitdiff
path: root/drivers/target/sbp
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2015-04-13 19:51:11 +0200
committerNicholas Bellinger <nab@linux-iscsi.org>2015-05-30 22:41:49 -0700
commit16233799e383fc76f20d8142ef55da2308d36c65 (patch)
tree7c92c2d53494ce6b77241a7fd7b6bb1afe22e1ea /drivers/target/sbp
parenta3b679e7e4369dfb5be735598888fcdef9d35196 (diff)
sbp_target: remove struct sbp_nacl
Except for the embedded struct se_node_acl none of the fields were ever used. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/sbp')
-rw-r--r--drivers/target/sbp/sbp_target.c24
-rw-r--r--drivers/target/sbp/sbp_target.h9
2 files changed, 3 insertions, 30 deletions
diff --git a/drivers/target/sbp/sbp_target.c b/drivers/target/sbp/sbp_target.c
index 18b0f9703ff2..61da83be8966 100644
--- a/drivers/target/sbp/sbp_target.c
+++ b/drivers/target/sbp/sbp_target.c
@@ -1714,24 +1714,14 @@ static u32 sbp_get_default_depth(struct se_portal_group *se_tpg)
static struct se_node_acl *sbp_alloc_fabric_acl(struct se_portal_group *se_tpg)
{
- struct sbp_nacl *nacl;
-
- nacl = kzalloc(sizeof(struct sbp_nacl), GFP_KERNEL);
- if (!nacl) {
- pr_err("Unable to allocate struct sbp_nacl\n");
- return NULL;
- }
-
- return &nacl->se_node_acl;
+ return kzalloc(sizeof(struct se_node_acl), GFP_KERNEL);
}
static void sbp_release_fabric_acl(
struct se_portal_group *se_tpg,
struct se_node_acl *se_nacl)
{
- struct sbp_nacl *nacl =
- container_of(se_nacl, struct sbp_nacl, se_node_acl);
- kfree(nacl);
+ kfree(se_nacl);
}
static u32 sbp_tpg_get_inst_index(struct se_portal_group *se_tpg)
@@ -2106,7 +2096,6 @@ static struct se_node_acl *sbp_make_nodeacl(
const char *name)
{
struct se_node_acl *se_nacl, *se_nacl_new;
- struct sbp_nacl *nacl;
u64 guid = 0;
u32 nexus_depth = 1;
@@ -2128,20 +2117,13 @@ static struct se_node_acl *sbp_make_nodeacl(
return se_nacl;
}
- nacl = container_of(se_nacl, struct sbp_nacl, se_node_acl);
- nacl->guid = guid;
- sbp_format_wwn(nacl->iport_name, SBP_NAMELEN, guid);
-
return se_nacl;
}
static void sbp_drop_nodeacl(struct se_node_acl *se_acl)
{
- struct sbp_nacl *nacl =
- container_of(se_acl, struct sbp_nacl, se_node_acl);
-
core_tpg_del_initiator_node_acl(se_acl->se_tpg, se_acl, 1);
- kfree(nacl);
+ kfree(se_acl);
}
static int sbp_post_link_lun(
diff --git a/drivers/target/sbp/sbp_target.h b/drivers/target/sbp/sbp_target.h
index 6d0d74a2c545..e1b0b84f7379 100644
--- a/drivers/target/sbp/sbp_target.h
+++ b/drivers/target/sbp/sbp_target.h
@@ -151,15 +151,6 @@ struct sbp_session {
u64 reconnect_expires;
};
-struct sbp_nacl {
- /* Initiator EUI-64 */
- u64 guid;
- /* ASCII formatted GUID for SBP Initiator port */
- char iport_name[SBP_NAMELEN];
- /* Returned by sbp_make_nodeacl() */
- struct se_node_acl se_node_acl;
-};
-
struct sbp_tpg {
/* Target portal group tag for TCM */
u16 tport_tpgt;