lib/iscsi: Set target node to the created session in create_iscsi_sess()

target had been set to the created session after returning from
create_iscsi_sess(). But create_iscsi_sess() has been used only in
a place and target has been already included in the arguments in
it. So set target to the created session in create_iscsi_sess().

Change-Id: Id65e6c5a1f76b995a7d0e9939ff3a2fce5daeb3f
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/450732
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
Shuhei Matsumoto 2019-04-10 13:39:56 +09:00 committed by Ben Walker
parent da98b92b92
commit adbae38935

View File

@ -1643,7 +1643,6 @@ iscsi_op_login_set_conn_info(struct spdk_iscsi_conn *conn,
conn->sess->initiator_port = initiator_port;
conn->StatSN = from_be32(&rsph->stat_sn);
conn->sess->isid = iscsi_get_isid(rsph->isid);
conn->sess->target = target;
/* Initiator port TransportID */
spdk_scsi_port_set_iscsi_transport_id(conn->sess->initiator_port,
@ -4749,7 +4748,7 @@ create_iscsi_sess(struct spdk_iscsi_conn *conn,
sess->connections++;
sess->params = NULL;
sess->target = NULL;
sess->target = target;
sess->isid = 0;
sess->session_type = session_type;
sess->current_text_itt = 0xffffffffU;