aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/target/iscsi
diff options
context:
space:
mode:
authorAndy Grover <agrover@redhat.com>2012-04-03 18:51:01 -0400
committerNicholas Bellinger <nab@linux-iscsi.org>2012-04-14 20:40:33 -0400
commit2fbb471e7821e3a12334054cd90aa3f3edb22cc3 (patch)
treec9937293332a96574b739a9e7cc77a9e13df9ea2 /drivers/target/iscsi
parent957525a2424aad367d6e0efb64e440b2b37fa5cd (diff)
target/iscsi: Rename iscsi_cmd.i_list to iscsi_cmd.i_conn_node
The name change makes it clear this list_head is so the cmd can be an item in the connection's conn_cmd_list. Signed-off-by: Andy Grover <agrover@redhat.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/iscsi')
-rw-r--r--drivers/target/iscsi/iscsi_target.c26
-rw-r--r--drivers/target/iscsi/iscsi_target_core.h2
-rw-r--r--drivers/target/iscsi/iscsi_target_erl1.c2
-rw-r--r--drivers/target/iscsi/iscsi_target_erl2.c28
-rw-r--r--drivers/target/iscsi/iscsi_target_tmr.c4
-rw-r--r--drivers/target/iscsi/iscsi_target_util.c14
6 files changed, 38 insertions, 38 deletions
diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c
index 8b1d5e62ed40..e635e263eb9d 100644
--- a/drivers/target/iscsi/iscsi_target.c
+++ b/drivers/target/iscsi/iscsi_target.c
@@ -622,7 +622,7 @@ int iscsit_add_reject(
622 } 622 }
623 623
624 spin_lock_bh(&conn->cmd_lock); 624 spin_lock_bh(&conn->cmd_lock);
625 list_add_tail(&cmd->i_list, &conn->conn_cmd_list); 625 list_add_tail(&cmd->i_conn_node, &conn->conn_cmd_list);
626 spin_unlock_bh(&conn->cmd_lock); 626 spin_unlock_bh(&conn->cmd_lock);
627 627
628 cmd->i_state = ISTATE_SEND_REJECT; 628 cmd->i_state = ISTATE_SEND_REJECT;
@@ -669,7 +669,7 @@ int iscsit_add_reject_from_cmd(
669 669
670 if (add_to_conn) { 670 if (add_to_conn) {
671 spin_lock_bh(&conn->cmd_lock); 671 spin_lock_bh(&conn->cmd_lock);
672 list_add_tail(&cmd->i_list, &conn->conn_cmd_list); 672 list_add_tail(&cmd->i_conn_node, &conn->conn_cmd_list);
673 spin_unlock_bh(&conn->cmd_lock); 673 spin_unlock_bh(&conn->cmd_lock);
674 } 674 }
675 675
@@ -744,7 +744,7 @@ static void iscsit_ack_from_expstatsn(struct iscsi_conn *conn, u32 exp_statsn)
744 conn->exp_statsn = exp_statsn; 744 conn->exp_statsn = exp_statsn;
745 745
746 spin_lock_bh(&conn->cmd_lock); 746 spin_lock_bh(&conn->cmd_lock);
747 list_for_each_entry(cmd, &conn->conn_cmd_list, i_list) { 747 list_for_each_entry(cmd, &conn->conn_cmd_list, i_conn_node) {
748 spin_lock(&cmd->istate_lock); 748 spin_lock(&cmd->istate_lock);
749 if ((cmd->i_state == ISTATE_SENT_STATUS) && 749 if ((cmd->i_state == ISTATE_SENT_STATUS) &&
750 (cmd->stat_sn < exp_statsn)) { 750 (cmd->stat_sn < exp_statsn)) {
@@ -1045,7 +1045,7 @@ done:
1045 1045
1046attach_cmd: 1046attach_cmd:
1047 spin_lock_bh(&conn->cmd_lock); 1047 spin_lock_bh(&conn->cmd_lock);
1048 list_add_tail(&cmd->i_list, &conn->conn_cmd_list); 1048 list_add_tail(&cmd->i_conn_node, &conn->conn_cmd_list);
1049 spin_unlock_bh(&conn->cmd_lock); 1049 spin_unlock_bh(&conn->cmd_lock);
1050 /* 1050 /*
1051 * Check if we need to delay processing because of ALUA 1051 * Check if we need to delay processing because of ALUA
@@ -1617,7 +1617,7 @@ static int iscsit_handle_nop_out(
1617 * Initiator is expecting a NopIN ping reply, 1617 * Initiator is expecting a NopIN ping reply,
1618 */ 1618 */
1619 spin_lock_bh(&conn->cmd_lock); 1619 spin_lock_bh(&conn->cmd_lock);
1620 list_add_tail(&cmd->i_list, &conn->conn_cmd_list); 1620 list_add_tail(&cmd->i_conn_node, &conn->conn_cmd_list);
1621 spin_unlock_bh(&conn->cmd_lock); 1621 spin_unlock_bh(&conn->cmd_lock);
1622 1622
1623 iscsit_ack_from_expstatsn(conn, hdr->exp_statsn); 1623 iscsit_ack_from_expstatsn(conn, hdr->exp_statsn);
@@ -1804,7 +1804,7 @@ static int iscsit_handle_task_mgt_cmd(
1804 se_tmr->call_transport = 1; 1804 se_tmr->call_transport = 1;
1805attach: 1805attach:
1806 spin_lock_bh(&conn->cmd_lock); 1806 spin_lock_bh(&conn->cmd_lock);
1807 list_add_tail(&cmd->i_list, &conn->conn_cmd_list); 1807 list_add_tail(&cmd->i_conn_node, &conn->conn_cmd_list);
1808 spin_unlock_bh(&conn->cmd_lock); 1808 spin_unlock_bh(&conn->cmd_lock);
1809 1809
1810 if (!(hdr->opcode & ISCSI_OP_IMMEDIATE)) { 1810 if (!(hdr->opcode & ISCSI_OP_IMMEDIATE)) {
@@ -1980,7 +1980,7 @@ static int iscsit_handle_text_cmd(
1980 cmd->data_direction = DMA_NONE; 1980 cmd->data_direction = DMA_NONE;
1981 1981
1982 spin_lock_bh(&conn->cmd_lock); 1982 spin_lock_bh(&conn->cmd_lock);
1983 list_add_tail(&cmd->i_list, &conn->conn_cmd_list); 1983 list_add_tail(&cmd->i_conn_node, &conn->conn_cmd_list);
1984 spin_unlock_bh(&conn->cmd_lock); 1984 spin_unlock_bh(&conn->cmd_lock);
1985 1985
1986 iscsit_ack_from_expstatsn(conn, hdr->exp_statsn); 1986 iscsit_ack_from_expstatsn(conn, hdr->exp_statsn);
@@ -2168,7 +2168,7 @@ static int iscsit_handle_logout_cmd(
2168 logout_remove = 1; 2168 logout_remove = 1;
2169 2169
2170 spin_lock_bh(&conn->cmd_lock); 2170 spin_lock_bh(&conn->cmd_lock);
2171 list_add_tail(&cmd->i_list, &conn->conn_cmd_list); 2171 list_add_tail(&cmd->i_conn_node, &conn->conn_cmd_list);
2172 spin_unlock_bh(&conn->cmd_lock); 2172 spin_unlock_bh(&conn->cmd_lock);
2173 2173
2174 if (reason_code != ISCSI_LOGOUT_REASON_RECOVERY) 2174 if (reason_code != ISCSI_LOGOUT_REASON_RECOVERY)
@@ -2381,7 +2381,7 @@ static void iscsit_build_conn_drop_async_message(struct iscsi_conn *conn)
2381 cmd->i_state = ISTATE_SEND_ASYNCMSG; 2381 cmd->i_state = ISTATE_SEND_ASYNCMSG;
2382 2382
2383 spin_lock_bh(&conn_p->cmd_lock); 2383 spin_lock_bh(&conn_p->cmd_lock);
2384 list_add_tail(&cmd->i_list, &conn_p->conn_cmd_list); 2384 list_add_tail(&cmd->i_conn_node, &conn_p->conn_cmd_list);
2385 spin_unlock_bh(&conn_p->cmd_lock); 2385 spin_unlock_bh(&conn_p->cmd_lock);
2386 2386
2387 iscsit_add_cmd_to_response_queue(cmd, conn_p, cmd->i_state); 2387 iscsit_add_cmd_to_response_queue(cmd, conn_p, cmd->i_state);
@@ -3552,7 +3552,7 @@ get_immediate:
3552 iscsit_stop_dataout_timer(cmd); 3552 iscsit_stop_dataout_timer(cmd);
3553 3553
3554 spin_lock_bh(&conn->cmd_lock); 3554 spin_lock_bh(&conn->cmd_lock);
3555 list_del(&cmd->i_list); 3555 list_del(&cmd->i_conn_node);
3556 spin_unlock_bh(&conn->cmd_lock); 3556 spin_unlock_bh(&conn->cmd_lock);
3557 3557
3558 iscsit_free_cmd(cmd); 3558 iscsit_free_cmd(cmd);
@@ -3952,9 +3952,9 @@ static void iscsit_release_commands_from_conn(struct iscsi_conn *conn)
3952 * has been reset -> returned sleeping pre-handler state. 3952 * has been reset -> returned sleeping pre-handler state.
3953 */ 3953 */
3954 spin_lock_bh(&conn->cmd_lock); 3954 spin_lock_bh(&conn->cmd_lock);
3955 list_for_each_entry_safe(cmd, cmd_tmp, &conn->conn_cmd_list, i_list) { 3955 list_for_each_entry_safe(cmd, cmd_tmp, &conn->conn_cmd_list, i_conn_node) {
3956 3956
3957 list_del(&cmd->i_list); 3957 list_del(&cmd->i_conn_node);
3958 spin_unlock_bh(&conn->cmd_lock); 3958 spin_unlock_bh(&conn->cmd_lock);
3959 3959
3960 iscsit_increment_maxcmdsn(cmd, sess); 3960 iscsit_increment_maxcmdsn(cmd, sess);
@@ -3972,7 +3972,7 @@ static void iscsit_stop_timers_for_cmds(
3972 struct iscsi_cmd *cmd; 3972 struct iscsi_cmd *cmd;
3973 3973
3974 spin_lock_bh(&conn->cmd_lock); 3974 spin_lock_bh(&conn->cmd_lock);
3975 list_for_each_entry(cmd, &conn->conn_cmd_list, i_list) { 3975 list_for_each_entry(cmd, &conn->conn_cmd_list, i_conn_node) {
3976 if (cmd->data_direction == DMA_TO_DEVICE) 3976 if (cmd->data_direction == DMA_TO_DEVICE)
3977 iscsit_stop_dataout_timer(cmd); 3977 iscsit_stop_dataout_timer(cmd);
3978 } 3978 }
diff --git a/drivers/target/iscsi/iscsi_target_core.h b/drivers/target/iscsi/iscsi_target_core.h
index 2aaee7efa683..cf784ccbd52f 100644
--- a/drivers/target/iscsi/iscsi_target_core.h
+++ b/drivers/target/iscsi/iscsi_target_core.h
@@ -464,7 +464,7 @@ struct iscsi_cmd {
464 /* Session the command is part of, used for connection recovery */ 464 /* Session the command is part of, used for connection recovery */
465 struct iscsi_session *sess; 465 struct iscsi_session *sess;
466 /* list_head for connection list */ 466 /* list_head for connection list */
467 struct list_head i_list; 467 struct list_head i_conn_node;
468 /* The TCM I/O descriptor that is accessed via container_of() */ 468 /* The TCM I/O descriptor that is accessed via container_of() */
469 struct se_cmd se_cmd; 469 struct se_cmd se_cmd;
470 /* Sense buffer that will be mapped into outgoing status */ 470 /* Sense buffer that will be mapped into outgoing status */
diff --git a/drivers/target/iscsi/iscsi_target_erl1.c b/drivers/target/iscsi/iscsi_target_erl1.c
index 006f605edb08..f6d1a23875a0 100644
--- a/drivers/target/iscsi/iscsi_target_erl1.c
+++ b/drivers/target/iscsi/iscsi_target_erl1.c
@@ -526,7 +526,7 @@ int iscsit_handle_status_snack(
526 found_cmd = 0; 526 found_cmd = 0;
527 527
528 spin_lock_bh(&conn->cmd_lock); 528 spin_lock_bh(&conn->cmd_lock);
529 list_for_each_entry(cmd, &conn->conn_cmd_list, i_list) { 529 list_for_each_entry(cmd, &conn->conn_cmd_list, i_conn_node) {
530 if (cmd->stat_sn == begrun) { 530 if (cmd->stat_sn == begrun) {
531 found_cmd = 1; 531 found_cmd = 1;
532 break; 532 break;
diff --git a/drivers/target/iscsi/iscsi_target_erl2.c b/drivers/target/iscsi/iscsi_target_erl2.c
index 1af1f21af21f..65aac14fd831 100644
--- a/drivers/target/iscsi/iscsi_target_erl2.c
+++ b/drivers/target/iscsi/iscsi_target_erl2.c
@@ -138,9 +138,9 @@ void iscsit_free_connection_recovery_entires(struct iscsi_session *sess)
138 138
139 spin_lock(&cr->conn_recovery_cmd_lock); 139 spin_lock(&cr->conn_recovery_cmd_lock);
140 list_for_each_entry_safe(cmd, cmd_tmp, 140 list_for_each_entry_safe(cmd, cmd_tmp,
141 &cr->conn_recovery_cmd_list, i_list) { 141 &cr->conn_recovery_cmd_list, i_conn_node) {
142 142
143 list_del(&cmd->i_list); 143 list_del(&cmd->i_conn_node);
144 cmd->conn = NULL; 144 cmd->conn = NULL;
145 spin_unlock(&cr->conn_recovery_cmd_lock); 145 spin_unlock(&cr->conn_recovery_cmd_lock);
146 iscsit_free_cmd(cmd); 146 iscsit_free_cmd(cmd);
@@ -160,9 +160,9 @@ void iscsit_free_connection_recovery_entires(struct iscsi_session *sess)
160 160
161 spin_lock(&cr->conn_recovery_cmd_lock); 161 spin_lock(&cr->conn_recovery_cmd_lock);
162 list_for_each_entry_safe(cmd, cmd_tmp, 162 list_for_each_entry_safe(cmd, cmd_tmp,
163 &cr->conn_recovery_cmd_list, i_list) { 163 &cr->conn_recovery_cmd_list, i_conn_node) {
164 164
165 list_del(&cmd->i_list); 165 list_del(&cmd->i_conn_node);
166 cmd->conn = NULL; 166 cmd->conn = NULL;
167 spin_unlock(&cr->conn_recovery_cmd_lock); 167 spin_unlock(&cr->conn_recovery_cmd_lock);
168 iscsit_free_cmd(cmd); 168 iscsit_free_cmd(cmd);
@@ -220,7 +220,7 @@ int iscsit_remove_cmd_from_connection_recovery(
220 } 220 }
221 cr = cmd->cr; 221 cr = cmd->cr;
222 222
223 list_del(&cmd->i_list); 223 list_del(&cmd->i_conn_node);
224 return --cr->cmd_count; 224 return --cr->cmd_count;
225} 225}
226 226
@@ -234,7 +234,7 @@ void iscsit_discard_cr_cmds_by_expstatsn(
234 234
235 spin_lock(&cr->conn_recovery_cmd_lock); 235 spin_lock(&cr->conn_recovery_cmd_lock);
236 list_for_each_entry_safe(cmd, cmd_tmp, 236 list_for_each_entry_safe(cmd, cmd_tmp,
237 &cr->conn_recovery_cmd_list, i_list) { 237 &cr->conn_recovery_cmd_list, i_conn_node) {
238 238
239 if (((cmd->deferred_i_state != ISTATE_SENT_STATUS) && 239 if (((cmd->deferred_i_state != ISTATE_SENT_STATUS) &&
240 (cmd->deferred_i_state != ISTATE_REMOVE)) || 240 (cmd->deferred_i_state != ISTATE_REMOVE)) ||
@@ -297,11 +297,11 @@ int iscsit_discard_unacknowledged_ooo_cmdsns_for_conn(struct iscsi_conn *conn)
297 mutex_unlock(&sess->cmdsn_mutex); 297 mutex_unlock(&sess->cmdsn_mutex);
298 298
299 spin_lock_bh(&conn->cmd_lock); 299 spin_lock_bh(&conn->cmd_lock);
300 list_for_each_entry_safe(cmd, cmd_tmp, &conn->conn_cmd_list, i_list) { 300 list_for_each_entry_safe(cmd, cmd_tmp, &conn->conn_cmd_list, i_conn_node) {
301 if (!(cmd->cmd_flags & ICF_OOO_CMDSN)) 301 if (!(cmd->cmd_flags & ICF_OOO_CMDSN))
302 continue; 302 continue;
303 303
304 list_del(&cmd->i_list); 304 list_del(&cmd->i_conn_node);
305 305
306 spin_unlock_bh(&conn->cmd_lock); 306 spin_unlock_bh(&conn->cmd_lock);
307 iscsit_free_cmd(cmd); 307 iscsit_free_cmd(cmd);
@@ -339,14 +339,14 @@ int iscsit_prepare_cmds_for_realligance(struct iscsi_conn *conn)
339 /* 339 /*
340 * Only perform connection recovery on ISCSI_OP_SCSI_CMD or 340 * Only perform connection recovery on ISCSI_OP_SCSI_CMD or
341 * ISCSI_OP_NOOP_OUT opcodes. For all other opcodes call 341 * ISCSI_OP_NOOP_OUT opcodes. For all other opcodes call
342 * list_del(&cmd->i_list); to release the command to the 342 * list_del(&cmd->i_conn_node); to release the command to the
343 * session pool and remove it from the connection's list. 343 * session pool and remove it from the connection's list.
344 * 344 *
345 * Also stop the DataOUT timer, which will be restarted after 345 * Also stop the DataOUT timer, which will be restarted after
346 * sending the TMR response. 346 * sending the TMR response.
347 */ 347 */
348 spin_lock_bh(&conn->cmd_lock); 348 spin_lock_bh(&conn->cmd_lock);
349 list_for_each_entry_safe(cmd, cmd_tmp, &conn->conn_cmd_list, i_list) { 349 list_for_each_entry_safe(cmd, cmd_tmp, &conn->conn_cmd_list, i_conn_node) {
350 350
351 if ((cmd->iscsi_opcode != ISCSI_OP_SCSI_CMD) && 351 if ((cmd->iscsi_opcode != ISCSI_OP_SCSI_CMD) &&
352 (cmd->iscsi_opcode != ISCSI_OP_NOOP_OUT)) { 352 (cmd->iscsi_opcode != ISCSI_OP_NOOP_OUT)) {
@@ -355,7 +355,7 @@ int iscsit_prepare_cmds_for_realligance(struct iscsi_conn *conn)
355 " CID: %hu\n", cmd->iscsi_opcode, 355 " CID: %hu\n", cmd->iscsi_opcode,
356 cmd->init_task_tag, cmd->cmd_sn, conn->cid); 356 cmd->init_task_tag, cmd->cmd_sn, conn->cid);
357 357
358 list_del(&cmd->i_list); 358 list_del(&cmd->i_conn_node);
359 spin_unlock_bh(&conn->cmd_lock); 359 spin_unlock_bh(&conn->cmd_lock);
360 iscsit_free_cmd(cmd); 360 iscsit_free_cmd(cmd);
361 spin_lock_bh(&conn->cmd_lock); 361 spin_lock_bh(&conn->cmd_lock);
@@ -375,7 +375,7 @@ int iscsit_prepare_cmds_for_realligance(struct iscsi_conn *conn)
375 */ 375 */
376 if (!(cmd->cmd_flags & ICF_OOO_CMDSN) && !cmd->immediate_cmd && 376 if (!(cmd->cmd_flags & ICF_OOO_CMDSN) && !cmd->immediate_cmd &&
377 (cmd->cmd_sn >= conn->sess->exp_cmd_sn)) { 377 (cmd->cmd_sn >= conn->sess->exp_cmd_sn)) {
378 list_del(&cmd->i_list); 378 list_del(&cmd->i_conn_node);
379 spin_unlock_bh(&conn->cmd_lock); 379 spin_unlock_bh(&conn->cmd_lock);
380 iscsit_free_cmd(cmd); 380 iscsit_free_cmd(cmd);
381 spin_lock_bh(&conn->cmd_lock); 381 spin_lock_bh(&conn->cmd_lock);
@@ -397,7 +397,7 @@ int iscsit_prepare_cmds_for_realligance(struct iscsi_conn *conn)
397 397
398 cmd->sess = conn->sess; 398 cmd->sess = conn->sess;
399 399
400 list_del(&cmd->i_list); 400 list_del(&cmd->i_conn_node);
401 spin_unlock_bh(&conn->cmd_lock); 401 spin_unlock_bh(&conn->cmd_lock);
402 402
403 iscsit_free_all_datain_reqs(cmd); 403 iscsit_free_all_datain_reqs(cmd);
@@ -407,7 +407,7 @@ int iscsit_prepare_cmds_for_realligance(struct iscsi_conn *conn)
407 * Add the struct iscsi_cmd to the connection recovery cmd list 407 * Add the struct iscsi_cmd to the connection recovery cmd list
408 */ 408 */
409 spin_lock(&cr->conn_recovery_cmd_lock); 409 spin_lock(&cr->conn_recovery_cmd_lock);
410 list_add_tail(&cmd->i_list, &cr->conn_recovery_cmd_list); 410 list_add_tail(&cmd->i_conn_node, &cr->conn_recovery_cmd_list);
411 spin_unlock(&cr->conn_recovery_cmd_lock); 411 spin_unlock(&cr->conn_recovery_cmd_lock);
412 412
413 spin_lock_bh(&conn->cmd_lock); 413 spin_lock_bh(&conn->cmd_lock);
diff --git a/drivers/target/iscsi/iscsi_target_tmr.c b/drivers/target/iscsi/iscsi_target_tmr.c
index e01da9d2b37e..1fcdf99be76f 100644
--- a/drivers/target/iscsi/iscsi_target_tmr.c
+++ b/drivers/target/iscsi/iscsi_target_tmr.c
@@ -216,7 +216,7 @@ static int iscsit_task_reassign_complete_nop_out(
216 iscsit_task_reassign_remove_cmd(cmd, cr, conn->sess); 216 iscsit_task_reassign_remove_cmd(cmd, cr, conn->sess);
217 217
218 spin_lock_bh(&conn->cmd_lock); 218 spin_lock_bh(&conn->cmd_lock);
219 list_add_tail(&cmd->i_list, &conn->conn_cmd_list); 219 list_add_tail(&cmd->i_conn_node, &conn->conn_cmd_list);
220 spin_unlock_bh(&conn->cmd_lock); 220 spin_unlock_bh(&conn->cmd_lock);
221 221
222 cmd->i_state = ISTATE_SEND_NOPIN; 222 cmd->i_state = ISTATE_SEND_NOPIN;
@@ -385,7 +385,7 @@ static int iscsit_task_reassign_complete_scsi_cmnd(
385 iscsit_task_reassign_remove_cmd(cmd, cr, conn->sess); 385 iscsit_task_reassign_remove_cmd(cmd, cr, conn->sess);
386 386
387 spin_lock_bh(&conn->cmd_lock); 387 spin_lock_bh(&conn->cmd_lock);
388 list_add_tail(&cmd->i_list, &conn->conn_cmd_list); 388 list_add_tail(&cmd->i_conn_node, &conn->conn_cmd_list);
389 spin_unlock_bh(&conn->cmd_lock); 389 spin_unlock_bh(&conn->cmd_lock);
390 390
391 if (se_cmd->se_cmd_flags & SCF_SENT_CHECK_CONDITION) { 391 if (se_cmd->se_cmd_flags & SCF_SENT_CHECK_CONDITION) {
diff --git a/drivers/target/iscsi/iscsi_target_util.c b/drivers/target/iscsi/iscsi_target_util.c
index 4eba86d2bd82..89cb91e2ffe8 100644
--- a/drivers/target/iscsi/iscsi_target_util.c
+++ b/drivers/target/iscsi/iscsi_target_util.c
@@ -163,7 +163,7 @@ struct iscsi_cmd *iscsit_allocate_cmd(struct iscsi_conn *conn, gfp_t gfp_mask)
163 } 163 }
164 164
165 cmd->conn = conn; 165 cmd->conn = conn;
166 INIT_LIST_HEAD(&cmd->i_list); 166 INIT_LIST_HEAD(&cmd->i_conn_node);
167 INIT_LIST_HEAD(&cmd->datain_list); 167 INIT_LIST_HEAD(&cmd->datain_list);
168 INIT_LIST_HEAD(&cmd->cmd_r2t_list); 168 INIT_LIST_HEAD(&cmd->cmd_r2t_list);
169 init_completion(&cmd->reject_comp); 169 init_completion(&cmd->reject_comp);
@@ -524,7 +524,7 @@ struct iscsi_cmd *iscsit_find_cmd_from_itt(
524 struct iscsi_cmd *cmd; 524 struct iscsi_cmd *cmd;
525 525
526 spin_lock_bh(&conn->cmd_lock); 526 spin_lock_bh(&conn->cmd_lock);
527 list_for_each_entry(cmd, &conn->conn_cmd_list, i_list) { 527 list_for_each_entry(cmd, &conn->conn_cmd_list, i_conn_node) {
528 if (cmd->init_task_tag == init_task_tag) { 528 if (cmd->init_task_tag == init_task_tag) {
529 spin_unlock_bh(&conn->cmd_lock); 529 spin_unlock_bh(&conn->cmd_lock);
530 return cmd; 530 return cmd;
@@ -545,7 +545,7 @@ struct iscsi_cmd *iscsit_find_cmd_from_itt_or_dump(
545 struct iscsi_cmd *cmd; 545 struct iscsi_cmd *cmd;
546 546
547 spin_lock_bh(&conn->cmd_lock); 547 spin_lock_bh(&conn->cmd_lock);
548 list_for_each_entry(cmd, &conn->conn_cmd_list, i_list) { 548 list_for_each_entry(cmd, &conn->conn_cmd_list, i_conn_node) {
549 if (cmd->init_task_tag == init_task_tag) { 549 if (cmd->init_task_tag == init_task_tag) {
550 spin_unlock_bh(&conn->cmd_lock); 550 spin_unlock_bh(&conn->cmd_lock);
551 return cmd; 551 return cmd;
@@ -568,7 +568,7 @@ struct iscsi_cmd *iscsit_find_cmd_from_ttt(
568 struct iscsi_cmd *cmd = NULL; 568 struct iscsi_cmd *cmd = NULL;
569 569
570 spin_lock_bh(&conn->cmd_lock); 570 spin_lock_bh(&conn->cmd_lock);
571 list_for_each_entry(cmd, &conn->conn_cmd_list, i_list) { 571 list_for_each_entry(cmd, &conn->conn_cmd_list, i_conn_node) {
572 if (cmd->targ_xfer_tag == targ_xfer_tag) { 572 if (cmd->targ_xfer_tag == targ_xfer_tag) {
573 spin_unlock_bh(&conn->cmd_lock); 573 spin_unlock_bh(&conn->cmd_lock);
574 return cmd; 574 return cmd;
@@ -596,7 +596,7 @@ int iscsit_find_cmd_for_recovery(
596 spin_lock(&sess->cr_i_lock); 596 spin_lock(&sess->cr_i_lock);
597 list_for_each_entry(cr, &sess->cr_inactive_list, cr_list) { 597 list_for_each_entry(cr, &sess->cr_inactive_list, cr_list) {
598 spin_lock(&cr->conn_recovery_cmd_lock); 598 spin_lock(&cr->conn_recovery_cmd_lock);
599 list_for_each_entry(cmd, &cr->conn_recovery_cmd_list, i_list) { 599 list_for_each_entry(cmd, &cr->conn_recovery_cmd_list, i_conn_node) {
600 if (cmd->init_task_tag == init_task_tag) { 600 if (cmd->init_task_tag == init_task_tag) {
601 spin_unlock(&cr->conn_recovery_cmd_lock); 601 spin_unlock(&cr->conn_recovery_cmd_lock);
602 spin_unlock(&sess->cr_i_lock); 602 spin_unlock(&sess->cr_i_lock);
@@ -616,7 +616,7 @@ int iscsit_find_cmd_for_recovery(
616 spin_lock(&sess->cr_a_lock); 616 spin_lock(&sess->cr_a_lock);
617 list_for_each_entry(cr, &sess->cr_active_list, cr_list) { 617 list_for_each_entry(cr, &sess->cr_active_list, cr_list) {
618 spin_lock(&cr->conn_recovery_cmd_lock); 618 spin_lock(&cr->conn_recovery_cmd_lock);
619 list_for_each_entry(cmd, &cr->conn_recovery_cmd_list, i_list) { 619 list_for_each_entry(cmd, &cr->conn_recovery_cmd_list, i_conn_node) {
620 if (cmd->init_task_tag == init_task_tag) { 620 if (cmd->init_task_tag == init_task_tag) {
621 spin_unlock(&cr->conn_recovery_cmd_lock); 621 spin_unlock(&cr->conn_recovery_cmd_lock);
622 spin_unlock(&sess->cr_a_lock); 622 spin_unlock(&sess->cr_a_lock);
@@ -1038,7 +1038,7 @@ static int iscsit_add_nopin(struct iscsi_conn *conn, int want_response)
1038 spin_unlock_bh(&conn->sess->ttt_lock); 1038 spin_unlock_bh(&conn->sess->ttt_lock);
1039 1039
1040 spin_lock_bh(&conn->cmd_lock); 1040 spin_lock_bh(&conn->cmd_lock);
1041 list_add_tail(&cmd->i_list, &conn->conn_cmd_list); 1041 list_add_tail(&cmd->i_conn_node, &conn->conn_cmd_list);
1042 spin_unlock_bh(&conn->cmd_lock); 1042 spin_unlock_bh(&conn->cmd_lock);
1043 1043
1044 if (want_response) 1044 if (want_response)