Loading drivers/vhost/scsi.c +3 −31 Original line number Diff line number Diff line Loading @@ -115,15 +115,6 @@ struct vhost_scsi_nexus { struct se_session *tvn_se_sess; }; struct vhost_scsi_nacl { /* Binary World Wide unique Port Name for Vhost Initiator port */ u64 iport_wwpn; /* ASCII formatted WWPN for Sas Initiator port */ char iport_name[VHOST_SCSI_NAMELEN]; /* Returned by vhost_scsi_make_nodeacl() */ struct se_node_acl se_node_acl; }; struct vhost_scsi_tpg { /* Vhost port target portal group tag for TCM */ u16 tport_tpgt; Loading Loading @@ -442,24 +433,14 @@ static int vhost_scsi_check_prot_fabric_only(struct se_portal_group *se_tpg) static struct se_node_acl * vhost_scsi_alloc_fabric_acl(struct se_portal_group *se_tpg) { struct vhost_scsi_nacl *nacl; nacl = kzalloc(sizeof(struct vhost_scsi_nacl), GFP_KERNEL); if (!nacl) { pr_err("Unable to allocate struct vhost_scsi_nacl\n"); return NULL; } return &nacl->se_node_acl; return kzalloc(sizeof(struct se_node_acl), GFP_KERNEL); } static void vhost_scsi_release_fabric_acl(struct se_portal_group *se_tpg, struct se_node_acl *se_nacl) { struct vhost_scsi_nacl *nacl = container_of(se_nacl, struct vhost_scsi_nacl, se_node_acl); kfree(nacl); kfree(se_nacl); } static u32 vhost_scsi_tpg_get_inst_index(struct se_portal_group *se_tpg) Loading Loading @@ -1828,8 +1809,6 @@ vhost_scsi_make_nodeacl(struct se_portal_group *se_tpg, const char *name) { struct se_node_acl *se_nacl, *se_nacl_new; struct vhost_scsi_nacl *nacl; u64 wwpn = 0; u32 nexus_depth; /* vhost_scsi_parse_wwn(name, &wwpn, 1) < 0) Loading @@ -1849,21 +1828,14 @@ vhost_scsi_make_nodeacl(struct se_portal_group *se_tpg, vhost_scsi_release_fabric_acl(se_tpg, se_nacl_new); return se_nacl; } /* * Locate our struct vhost_scsi_nacl and set the FC Nport WWPN */ nacl = container_of(se_nacl, struct vhost_scsi_nacl, se_node_acl); nacl->iport_wwpn = wwpn; return se_nacl; } static void vhost_scsi_drop_nodeacl(struct se_node_acl *se_acl) { struct vhost_scsi_nacl *nacl = container_of(se_acl, struct vhost_scsi_nacl, se_node_acl); core_tpg_del_initiator_node_acl(se_acl->se_tpg, se_acl, 1); kfree(nacl); kfree(se_acl); } static void vhost_scsi_free_cmd_map_res(struct vhost_scsi_nexus *nexus, Loading Loading
drivers/vhost/scsi.c +3 −31 Original line number Diff line number Diff line Loading @@ -115,15 +115,6 @@ struct vhost_scsi_nexus { struct se_session *tvn_se_sess; }; struct vhost_scsi_nacl { /* Binary World Wide unique Port Name for Vhost Initiator port */ u64 iport_wwpn; /* ASCII formatted WWPN for Sas Initiator port */ char iport_name[VHOST_SCSI_NAMELEN]; /* Returned by vhost_scsi_make_nodeacl() */ struct se_node_acl se_node_acl; }; struct vhost_scsi_tpg { /* Vhost port target portal group tag for TCM */ u16 tport_tpgt; Loading Loading @@ -442,24 +433,14 @@ static int vhost_scsi_check_prot_fabric_only(struct se_portal_group *se_tpg) static struct se_node_acl * vhost_scsi_alloc_fabric_acl(struct se_portal_group *se_tpg) { struct vhost_scsi_nacl *nacl; nacl = kzalloc(sizeof(struct vhost_scsi_nacl), GFP_KERNEL); if (!nacl) { pr_err("Unable to allocate struct vhost_scsi_nacl\n"); return NULL; } return &nacl->se_node_acl; return kzalloc(sizeof(struct se_node_acl), GFP_KERNEL); } static void vhost_scsi_release_fabric_acl(struct se_portal_group *se_tpg, struct se_node_acl *se_nacl) { struct vhost_scsi_nacl *nacl = container_of(se_nacl, struct vhost_scsi_nacl, se_node_acl); kfree(nacl); kfree(se_nacl); } static u32 vhost_scsi_tpg_get_inst_index(struct se_portal_group *se_tpg) Loading Loading @@ -1828,8 +1809,6 @@ vhost_scsi_make_nodeacl(struct se_portal_group *se_tpg, const char *name) { struct se_node_acl *se_nacl, *se_nacl_new; struct vhost_scsi_nacl *nacl; u64 wwpn = 0; u32 nexus_depth; /* vhost_scsi_parse_wwn(name, &wwpn, 1) < 0) Loading @@ -1849,21 +1828,14 @@ vhost_scsi_make_nodeacl(struct se_portal_group *se_tpg, vhost_scsi_release_fabric_acl(se_tpg, se_nacl_new); return se_nacl; } /* * Locate our struct vhost_scsi_nacl and set the FC Nport WWPN */ nacl = container_of(se_nacl, struct vhost_scsi_nacl, se_node_acl); nacl->iport_wwpn = wwpn; return se_nacl; } static void vhost_scsi_drop_nodeacl(struct se_node_acl *se_acl) { struct vhost_scsi_nacl *nacl = container_of(se_acl, struct vhost_scsi_nacl, se_node_acl); core_tpg_del_initiator_node_acl(se_acl->se_tpg, se_acl, 1); kfree(nacl); kfree(se_acl); } static void vhost_scsi_free_cmd_map_res(struct vhost_scsi_nexus *nexus, Loading