@@ -1308,9 +1308,7 @@ static ssize_t target_stat_iport_port_ident_show(struct config_item *item,
struct se_lun_acl *lacl = iport_to_lacl(item);
struct se_node_acl *nacl = lacl->se_lun_nacl;
struct se_session *se_sess;
- struct se_portal_group *tpg;
ssize_t ret;
- unsigned char buf[64];
spin_lock_irq(&nacl->nacl_sess_lock);
se_sess = nacl->nacl_sess;
@@ -1319,13 +1317,9 @@ static ssize_t target_stat_iport_port_ident_show(struct config_item *item,
return -ENODEV;
}
- tpg = nacl->se_tpg;
- /* scsiAttIntrPortName+scsiAttIntrPortIdentifier */
- memset(buf, 0, 64);
- if (tpg->se_tpg_tfo->sess_get_initiator_sid != NULL)
- tpg->se_tpg_tfo->sess_get_initiator_sid(se_sess, buf, 64);
-
- ret = snprintf(page, PAGE_SIZE, "%s+i+%s\n", nacl->initiatorname, buf);
+ ret = snprintf(page, PAGE_SIZE, "%s+i+%s\n", nacl->initiatorname,
+ se_sess->tpt_id->session_id ? se_sess->tpt_id->session_id :
+ "");
spin_unlock_irq(&nacl->nacl_sess_lock);
return ret;
}