Commit 2fbb471e authored by Andy Grover's avatar Andy Grover Committed by Nicholas Bellinger

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: default avatarAndy Grover <agrover@redhat.com>
Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
parent 957525a2
...@@ -622,7 +622,7 @@ int iscsit_add_reject( ...@@ -622,7 +622,7 @@ int iscsit_add_reject(
} }
spin_lock_bh(&conn->cmd_lock); spin_lock_bh(&conn->cmd_lock);
list_add_tail(&cmd->i_list, &conn->conn_cmd_list); list_add_tail(&cmd->i_conn_node, &conn->conn_cmd_list);
spin_unlock_bh(&conn->cmd_lock); spin_unlock_bh(&conn->cmd_lock);
cmd->i_state = ISTATE_SEND_REJECT; cmd->i_state = ISTATE_SEND_REJECT;
...@@ -669,7 +669,7 @@ int iscsit_add_reject_from_cmd( ...@@ -669,7 +669,7 @@ int iscsit_add_reject_from_cmd(
if (add_to_conn) { if (add_to_conn) {
spin_lock_bh(&conn->cmd_lock); spin_lock_bh(&conn->cmd_lock);
list_add_tail(&cmd->i_list, &conn->conn_cmd_list); list_add_tail(&cmd->i_conn_node, &conn->conn_cmd_list);
spin_unlock_bh(&conn->cmd_lock); spin_unlock_bh(&conn->cmd_lock);
} }
...@@ -744,7 +744,7 @@ static void iscsit_ack_from_expstatsn(struct iscsi_conn *conn, u32 exp_statsn) ...@@ -744,7 +744,7 @@ static void iscsit_ack_from_expstatsn(struct iscsi_conn *conn, u32 exp_statsn)
conn->exp_statsn = exp_statsn; conn->exp_statsn = exp_statsn;
spin_lock_bh(&conn->cmd_lock); spin_lock_bh(&conn->cmd_lock);
list_for_each_entry(cmd, &conn->conn_cmd_list, i_list) { list_for_each_entry(cmd, &conn->conn_cmd_list, i_conn_node) {
spin_lock(&cmd->istate_lock); spin_lock(&cmd->istate_lock);
if ((cmd->i_state == ISTATE_SENT_STATUS) && if ((cmd->i_state == ISTATE_SENT_STATUS) &&
(cmd->stat_sn < exp_statsn)) { (cmd->stat_sn < exp_statsn)) {
...@@ -1045,7 +1045,7 @@ static int iscsit_handle_scsi_cmd( ...@@ -1045,7 +1045,7 @@ static int iscsit_handle_scsi_cmd(
attach_cmd: attach_cmd:
spin_lock_bh(&conn->cmd_lock); spin_lock_bh(&conn->cmd_lock);
list_add_tail(&cmd->i_list, &conn->conn_cmd_list); list_add_tail(&cmd->i_conn_node, &conn->conn_cmd_list);
spin_unlock_bh(&conn->cmd_lock); spin_unlock_bh(&conn->cmd_lock);
/* /*
* Check if we need to delay processing because of ALUA * Check if we need to delay processing because of ALUA
...@@ -1617,7 +1617,7 @@ static int iscsit_handle_nop_out( ...@@ -1617,7 +1617,7 @@ static int iscsit_handle_nop_out(
* Initiator is expecting a NopIN ping reply, * Initiator is expecting a NopIN ping reply,
*/ */
spin_lock_bh(&conn->cmd_lock); spin_lock_bh(&conn->cmd_lock);
list_add_tail(&cmd->i_list, &conn->conn_cmd_list); list_add_tail(&cmd->i_conn_node, &conn->conn_cmd_list);
spin_unlock_bh(&conn->cmd_lock); spin_unlock_bh(&conn->cmd_lock);
iscsit_ack_from_expstatsn(conn, hdr->exp_statsn); iscsit_ack_from_expstatsn(conn, hdr->exp_statsn);
...@@ -1804,7 +1804,7 @@ static int iscsit_handle_task_mgt_cmd( ...@@ -1804,7 +1804,7 @@ static int iscsit_handle_task_mgt_cmd(
se_tmr->call_transport = 1; se_tmr->call_transport = 1;
attach: attach:
spin_lock_bh(&conn->cmd_lock); spin_lock_bh(&conn->cmd_lock);
list_add_tail(&cmd->i_list, &conn->conn_cmd_list); list_add_tail(&cmd->i_conn_node, &conn->conn_cmd_list);
spin_unlock_bh(&conn->cmd_lock); spin_unlock_bh(&conn->cmd_lock);
if (!(hdr->opcode & ISCSI_OP_IMMEDIATE)) { if (!(hdr->opcode & ISCSI_OP_IMMEDIATE)) {
...@@ -1980,7 +1980,7 @@ static int iscsit_handle_text_cmd( ...@@ -1980,7 +1980,7 @@ static int iscsit_handle_text_cmd(
cmd->data_direction = DMA_NONE; cmd->data_direction = DMA_NONE;
spin_lock_bh(&conn->cmd_lock); spin_lock_bh(&conn->cmd_lock);
list_add_tail(&cmd->i_list, &conn->conn_cmd_list); list_add_tail(&cmd->i_conn_node, &conn->conn_cmd_list);
spin_unlock_bh(&conn->cmd_lock); spin_unlock_bh(&conn->cmd_lock);
iscsit_ack_from_expstatsn(conn, hdr->exp_statsn); iscsit_ack_from_expstatsn(conn, hdr->exp_statsn);
...@@ -2168,7 +2168,7 @@ static int iscsit_handle_logout_cmd( ...@@ -2168,7 +2168,7 @@ static int iscsit_handle_logout_cmd(
logout_remove = 1; logout_remove = 1;
spin_lock_bh(&conn->cmd_lock); spin_lock_bh(&conn->cmd_lock);
list_add_tail(&cmd->i_list, &conn->conn_cmd_list); list_add_tail(&cmd->i_conn_node, &conn->conn_cmd_list);
spin_unlock_bh(&conn->cmd_lock); spin_unlock_bh(&conn->cmd_lock);
if (reason_code != ISCSI_LOGOUT_REASON_RECOVERY) if (reason_code != ISCSI_LOGOUT_REASON_RECOVERY)
...@@ -2381,7 +2381,7 @@ static void iscsit_build_conn_drop_async_message(struct iscsi_conn *conn) ...@@ -2381,7 +2381,7 @@ static void iscsit_build_conn_drop_async_message(struct iscsi_conn *conn)
cmd->i_state = ISTATE_SEND_ASYNCMSG; cmd->i_state = ISTATE_SEND_ASYNCMSG;
spin_lock_bh(&conn_p->cmd_lock); spin_lock_bh(&conn_p->cmd_lock);
list_add_tail(&cmd->i_list, &conn_p->conn_cmd_list); list_add_tail(&cmd->i_conn_node, &conn_p->conn_cmd_list);
spin_unlock_bh(&conn_p->cmd_lock); spin_unlock_bh(&conn_p->cmd_lock);
iscsit_add_cmd_to_response_queue(cmd, conn_p, cmd->i_state); iscsit_add_cmd_to_response_queue(cmd, conn_p, cmd->i_state);
...@@ -3552,7 +3552,7 @@ int iscsi_target_tx_thread(void *arg) ...@@ -3552,7 +3552,7 @@ int iscsi_target_tx_thread(void *arg)
iscsit_stop_dataout_timer(cmd); iscsit_stop_dataout_timer(cmd);
spin_lock_bh(&conn->cmd_lock); spin_lock_bh(&conn->cmd_lock);
list_del(&cmd->i_list); list_del(&cmd->i_conn_node);
spin_unlock_bh(&conn->cmd_lock); spin_unlock_bh(&conn->cmd_lock);
iscsit_free_cmd(cmd); iscsit_free_cmd(cmd);
...@@ -3952,9 +3952,9 @@ static void iscsit_release_commands_from_conn(struct iscsi_conn *conn) ...@@ -3952,9 +3952,9 @@ static void iscsit_release_commands_from_conn(struct iscsi_conn *conn)
* has been reset -> returned sleeping pre-handler state. * has been reset -> returned sleeping pre-handler state.
*/ */
spin_lock_bh(&conn->cmd_lock); spin_lock_bh(&conn->cmd_lock);
list_for_each_entry_safe(cmd, cmd_tmp, &conn->conn_cmd_list, i_list) { list_for_each_entry_safe(cmd, cmd_tmp, &conn->conn_cmd_list, i_conn_node) {
list_del(&cmd->i_list); list_del(&cmd->i_conn_node);
spin_unlock_bh(&conn->cmd_lock); spin_unlock_bh(&conn->cmd_lock);
iscsit_increment_maxcmdsn(cmd, sess); iscsit_increment_maxcmdsn(cmd, sess);
...@@ -3972,7 +3972,7 @@ static void iscsit_stop_timers_for_cmds( ...@@ -3972,7 +3972,7 @@ static void iscsit_stop_timers_for_cmds(
struct iscsi_cmd *cmd; struct iscsi_cmd *cmd;
spin_lock_bh(&conn->cmd_lock); spin_lock_bh(&conn->cmd_lock);
list_for_each_entry(cmd, &conn->conn_cmd_list, i_list) { list_for_each_entry(cmd, &conn->conn_cmd_list, i_conn_node) {
if (cmd->data_direction == DMA_TO_DEVICE) if (cmd->data_direction == DMA_TO_DEVICE)
iscsit_stop_dataout_timer(cmd); iscsit_stop_dataout_timer(cmd);
} }
......
...@@ -464,7 +464,7 @@ struct iscsi_cmd { ...@@ -464,7 +464,7 @@ struct iscsi_cmd {
/* Session the command is part of, used for connection recovery */ /* Session the command is part of, used for connection recovery */
struct iscsi_session *sess; struct iscsi_session *sess;
/* list_head for connection list */ /* list_head for connection list */
struct list_head i_list; struct list_head i_conn_node;
/* The TCM I/O descriptor that is accessed via container_of() */ /* The TCM I/O descriptor that is accessed via container_of() */
struct se_cmd se_cmd; struct se_cmd se_cmd;
/* Sense buffer that will be mapped into outgoing status */ /* Sense buffer that will be mapped into outgoing status */
......
...@@ -526,7 +526,7 @@ int iscsit_handle_status_snack( ...@@ -526,7 +526,7 @@ int iscsit_handle_status_snack(
found_cmd = 0; found_cmd = 0;
spin_lock_bh(&conn->cmd_lock); spin_lock_bh(&conn->cmd_lock);
list_for_each_entry(cmd, &conn->conn_cmd_list, i_list) { list_for_each_entry(cmd, &conn->conn_cmd_list, i_conn_node) {
if (cmd->stat_sn == begrun) { if (cmd->stat_sn == begrun) {
found_cmd = 1; found_cmd = 1;
break; break;
......
...@@ -138,9 +138,9 @@ void iscsit_free_connection_recovery_entires(struct iscsi_session *sess) ...@@ -138,9 +138,9 @@ void iscsit_free_connection_recovery_entires(struct iscsi_session *sess)
spin_lock(&cr->conn_recovery_cmd_lock); spin_lock(&cr->conn_recovery_cmd_lock);
list_for_each_entry_safe(cmd, cmd_tmp, list_for_each_entry_safe(cmd, cmd_tmp,
&cr->conn_recovery_cmd_list, i_list) { &cr->conn_recovery_cmd_list, i_conn_node) {
list_del(&cmd->i_list); list_del(&cmd->i_conn_node);
cmd->conn = NULL; cmd->conn = NULL;
spin_unlock(&cr->conn_recovery_cmd_lock); spin_unlock(&cr->conn_recovery_cmd_lock);
iscsit_free_cmd(cmd); iscsit_free_cmd(cmd);
...@@ -160,9 +160,9 @@ void iscsit_free_connection_recovery_entires(struct iscsi_session *sess) ...@@ -160,9 +160,9 @@ void iscsit_free_connection_recovery_entires(struct iscsi_session *sess)
spin_lock(&cr->conn_recovery_cmd_lock); spin_lock(&cr->conn_recovery_cmd_lock);
list_for_each_entry_safe(cmd, cmd_tmp, list_for_each_entry_safe(cmd, cmd_tmp,
&cr->conn_recovery_cmd_list, i_list) { &cr->conn_recovery_cmd_list, i_conn_node) {
list_del(&cmd->i_list); list_del(&cmd->i_conn_node);
cmd->conn = NULL; cmd->conn = NULL;
spin_unlock(&cr->conn_recovery_cmd_lock); spin_unlock(&cr->conn_recovery_cmd_lock);
iscsit_free_cmd(cmd); iscsit_free_cmd(cmd);
...@@ -220,7 +220,7 @@ int iscsit_remove_cmd_from_connection_recovery( ...@@ -220,7 +220,7 @@ int iscsit_remove_cmd_from_connection_recovery(
} }
cr = cmd->cr; cr = cmd->cr;
list_del(&cmd->i_list); list_del(&cmd->i_conn_node);
return --cr->cmd_count; return --cr->cmd_count;
} }
...@@ -234,7 +234,7 @@ void iscsit_discard_cr_cmds_by_expstatsn( ...@@ -234,7 +234,7 @@ void iscsit_discard_cr_cmds_by_expstatsn(
spin_lock(&cr->conn_recovery_cmd_lock); spin_lock(&cr->conn_recovery_cmd_lock);
list_for_each_entry_safe(cmd, cmd_tmp, list_for_each_entry_safe(cmd, cmd_tmp,
&cr->conn_recovery_cmd_list, i_list) { &cr->conn_recovery_cmd_list, i_conn_node) {
if (((cmd->deferred_i_state != ISTATE_SENT_STATUS) && if (((cmd->deferred_i_state != ISTATE_SENT_STATUS) &&
(cmd->deferred_i_state != ISTATE_REMOVE)) || (cmd->deferred_i_state != ISTATE_REMOVE)) ||
...@@ -297,11 +297,11 @@ int iscsit_discard_unacknowledged_ooo_cmdsns_for_conn(struct iscsi_conn *conn) ...@@ -297,11 +297,11 @@ int iscsit_discard_unacknowledged_ooo_cmdsns_for_conn(struct iscsi_conn *conn)
mutex_unlock(&sess->cmdsn_mutex); mutex_unlock(&sess->cmdsn_mutex);
spin_lock_bh(&conn->cmd_lock); spin_lock_bh(&conn->cmd_lock);
list_for_each_entry_safe(cmd, cmd_tmp, &conn->conn_cmd_list, i_list) { list_for_each_entry_safe(cmd, cmd_tmp, &conn->conn_cmd_list, i_conn_node) {
if (!(cmd->cmd_flags & ICF_OOO_CMDSN)) if (!(cmd->cmd_flags & ICF_OOO_CMDSN))
continue; continue;
list_del(&cmd->i_list); list_del(&cmd->i_conn_node);
spin_unlock_bh(&conn->cmd_lock); spin_unlock_bh(&conn->cmd_lock);
iscsit_free_cmd(cmd); iscsit_free_cmd(cmd);
...@@ -339,14 +339,14 @@ int iscsit_prepare_cmds_for_realligance(struct iscsi_conn *conn) ...@@ -339,14 +339,14 @@ int iscsit_prepare_cmds_for_realligance(struct iscsi_conn *conn)
/* /*
* Only perform connection recovery on ISCSI_OP_SCSI_CMD or * Only perform connection recovery on ISCSI_OP_SCSI_CMD or
* ISCSI_OP_NOOP_OUT opcodes. For all other opcodes call * ISCSI_OP_NOOP_OUT opcodes. For all other opcodes call
* list_del(&cmd->i_list); to release the command to the * list_del(&cmd->i_conn_node); to release the command to the
* session pool and remove it from the connection's list. * session pool and remove it from the connection's list.
* *
* Also stop the DataOUT timer, which will be restarted after * Also stop the DataOUT timer, which will be restarted after
* sending the TMR response. * sending the TMR response.
*/ */
spin_lock_bh(&conn->cmd_lock); spin_lock_bh(&conn->cmd_lock);
list_for_each_entry_safe(cmd, cmd_tmp, &conn->conn_cmd_list, i_list) { list_for_each_entry_safe(cmd, cmd_tmp, &conn->conn_cmd_list, i_conn_node) {
if ((cmd->iscsi_opcode != ISCSI_OP_SCSI_CMD) && if ((cmd->iscsi_opcode != ISCSI_OP_SCSI_CMD) &&
(cmd->iscsi_opcode != ISCSI_OP_NOOP_OUT)) { (cmd->iscsi_opcode != ISCSI_OP_NOOP_OUT)) {
...@@ -355,7 +355,7 @@ int iscsit_prepare_cmds_for_realligance(struct iscsi_conn *conn) ...@@ -355,7 +355,7 @@ int iscsit_prepare_cmds_for_realligance(struct iscsi_conn *conn)
" CID: %hu\n", cmd->iscsi_opcode, " CID: %hu\n", cmd->iscsi_opcode,
cmd->init_task_tag, cmd->cmd_sn, conn->cid); cmd->init_task_tag, cmd->cmd_sn, conn->cid);
list_del(&cmd->i_list); list_del(&cmd->i_conn_node);
spin_unlock_bh(&conn->cmd_lock); spin_unlock_bh(&conn->cmd_lock);
iscsit_free_cmd(cmd); iscsit_free_cmd(cmd);
spin_lock_bh(&conn->cmd_lock); spin_lock_bh(&conn->cmd_lock);
...@@ -375,7 +375,7 @@ int iscsit_prepare_cmds_for_realligance(struct iscsi_conn *conn) ...@@ -375,7 +375,7 @@ int iscsit_prepare_cmds_for_realligance(struct iscsi_conn *conn)
*/ */
if (!(cmd->cmd_flags & ICF_OOO_CMDSN) && !cmd->immediate_cmd && if (!(cmd->cmd_flags & ICF_OOO_CMDSN) && !cmd->immediate_cmd &&
(cmd->cmd_sn >= conn->sess->exp_cmd_sn)) { (cmd->cmd_sn >= conn->sess->exp_cmd_sn)) {
list_del(&cmd->i_list); list_del(&cmd->i_conn_node);
spin_unlock_bh(&conn->cmd_lock); spin_unlock_bh(&conn->cmd_lock);
iscsit_free_cmd(cmd); iscsit_free_cmd(cmd);
spin_lock_bh(&conn->cmd_lock); spin_lock_bh(&conn->cmd_lock);
...@@ -397,7 +397,7 @@ int iscsit_prepare_cmds_for_realligance(struct iscsi_conn *conn) ...@@ -397,7 +397,7 @@ int iscsit_prepare_cmds_for_realligance(struct iscsi_conn *conn)
cmd->sess = conn->sess; cmd->sess = conn->sess;
list_del(&cmd->i_list); list_del(&cmd->i_conn_node);
spin_unlock_bh(&conn->cmd_lock); spin_unlock_bh(&conn->cmd_lock);
iscsit_free_all_datain_reqs(cmd); iscsit_free_all_datain_reqs(cmd);
...@@ -407,7 +407,7 @@ int iscsit_prepare_cmds_for_realligance(struct iscsi_conn *conn) ...@@ -407,7 +407,7 @@ int iscsit_prepare_cmds_for_realligance(struct iscsi_conn *conn)
* Add the struct iscsi_cmd to the connection recovery cmd list * Add the struct iscsi_cmd to the connection recovery cmd list
*/ */
spin_lock(&cr->conn_recovery_cmd_lock); spin_lock(&cr->conn_recovery_cmd_lock);
list_add_tail(&cmd->i_list, &cr->conn_recovery_cmd_list); list_add_tail(&cmd->i_conn_node, &cr->conn_recovery_cmd_list);
spin_unlock(&cr->conn_recovery_cmd_lock); spin_unlock(&cr->conn_recovery_cmd_lock);
spin_lock_bh(&conn->cmd_lock); spin_lock_bh(&conn->cmd_lock);
......
...@@ -216,7 +216,7 @@ static int iscsit_task_reassign_complete_nop_out( ...@@ -216,7 +216,7 @@ static int iscsit_task_reassign_complete_nop_out(
iscsit_task_reassign_remove_cmd(cmd, cr, conn->sess); iscsit_task_reassign_remove_cmd(cmd, cr, conn->sess);
spin_lock_bh(&conn->cmd_lock); spin_lock_bh(&conn->cmd_lock);
list_add_tail(&cmd->i_list, &conn->conn_cmd_list); list_add_tail(&cmd->i_conn_node, &conn->conn_cmd_list);
spin_unlock_bh(&conn->cmd_lock); spin_unlock_bh(&conn->cmd_lock);
cmd->i_state = ISTATE_SEND_NOPIN; cmd->i_state = ISTATE_SEND_NOPIN;
...@@ -385,7 +385,7 @@ static int iscsit_task_reassign_complete_scsi_cmnd( ...@@ -385,7 +385,7 @@ static int iscsit_task_reassign_complete_scsi_cmnd(
iscsit_task_reassign_remove_cmd(cmd, cr, conn->sess); iscsit_task_reassign_remove_cmd(cmd, cr, conn->sess);
spin_lock_bh(&conn->cmd_lock); spin_lock_bh(&conn->cmd_lock);
list_add_tail(&cmd->i_list, &conn->conn_cmd_list); list_add_tail(&cmd->i_conn_node, &conn->conn_cmd_list);
spin_unlock_bh(&conn->cmd_lock); spin_unlock_bh(&conn->cmd_lock);
if (se_cmd->se_cmd_flags & SCF_SENT_CHECK_CONDITION) { if (se_cmd->se_cmd_flags & SCF_SENT_CHECK_CONDITION) {
......
...@@ -163,7 +163,7 @@ struct iscsi_cmd *iscsit_allocate_cmd(struct iscsi_conn *conn, gfp_t gfp_mask) ...@@ -163,7 +163,7 @@ struct iscsi_cmd *iscsit_allocate_cmd(struct iscsi_conn *conn, gfp_t gfp_mask)
} }
cmd->conn = conn; cmd->conn = conn;
INIT_LIST_HEAD(&cmd->i_list); INIT_LIST_HEAD(&cmd->i_conn_node);
INIT_LIST_HEAD(&cmd->datain_list); INIT_LIST_HEAD(&cmd->datain_list);
INIT_LIST_HEAD(&cmd->cmd_r2t_list); INIT_LIST_HEAD(&cmd->cmd_r2t_list);
init_completion(&cmd->reject_comp); init_completion(&cmd->reject_comp);
...@@ -524,7 +524,7 @@ struct iscsi_cmd *iscsit_find_cmd_from_itt( ...@@ -524,7 +524,7 @@ struct iscsi_cmd *iscsit_find_cmd_from_itt(
struct iscsi_cmd *cmd; struct iscsi_cmd *cmd;
spin_lock_bh(&conn->cmd_lock); spin_lock_bh(&conn->cmd_lock);
list_for_each_entry(cmd, &conn->conn_cmd_list, i_list) { list_for_each_entry(cmd, &conn->conn_cmd_list, i_conn_node) {
if (cmd->init_task_tag == init_task_tag) { if (cmd->init_task_tag == init_task_tag) {
spin_unlock_bh(&conn->cmd_lock); spin_unlock_bh(&conn->cmd_lock);
return cmd; return cmd;
...@@ -545,7 +545,7 @@ struct iscsi_cmd *iscsit_find_cmd_from_itt_or_dump( ...@@ -545,7 +545,7 @@ struct iscsi_cmd *iscsit_find_cmd_from_itt_or_dump(
struct iscsi_cmd *cmd; struct iscsi_cmd *cmd;
spin_lock_bh(&conn->cmd_lock); spin_lock_bh(&conn->cmd_lock);
list_for_each_entry(cmd, &conn->conn_cmd_list, i_list) { list_for_each_entry(cmd, &conn->conn_cmd_list, i_conn_node) {
if (cmd->init_task_tag == init_task_tag) { if (cmd->init_task_tag == init_task_tag) {
spin_unlock_bh(&conn->cmd_lock); spin_unlock_bh(&conn->cmd_lock);
return cmd; return cmd;
...@@ -568,7 +568,7 @@ struct iscsi_cmd *iscsit_find_cmd_from_ttt( ...@@ -568,7 +568,7 @@ struct iscsi_cmd *iscsit_find_cmd_from_ttt(
struct iscsi_cmd *cmd = NULL; struct iscsi_cmd *cmd = NULL;
spin_lock_bh(&conn->cmd_lock); spin_lock_bh(&conn->cmd_lock);
list_for_each_entry(cmd, &conn->conn_cmd_list, i_list) { list_for_each_entry(cmd, &conn->conn_cmd_list, i_conn_node) {
if (cmd->targ_xfer_tag == targ_xfer_tag) { if (cmd->targ_xfer_tag == targ_xfer_tag) {
spin_unlock_bh(&conn->cmd_lock); spin_unlock_bh(&conn->cmd_lock);
return cmd; return cmd;
...@@ -596,7 +596,7 @@ int iscsit_find_cmd_for_recovery( ...@@ -596,7 +596,7 @@ int iscsit_find_cmd_for_recovery(
spin_lock(&sess->cr_i_lock); spin_lock(&sess->cr_i_lock);
list_for_each_entry(cr, &sess->cr_inactive_list, cr_list) { list_for_each_entry(cr, &sess->cr_inactive_list, cr_list) {
spin_lock(&cr->conn_recovery_cmd_lock); spin_lock(&cr->conn_recovery_cmd_lock);
list_for_each_entry(cmd, &cr->conn_recovery_cmd_list, i_list) { list_for_each_entry(cmd, &cr->conn_recovery_cmd_list, i_conn_node) {
if (cmd->init_task_tag == init_task_tag) { if (cmd->init_task_tag == init_task_tag) {
spin_unlock(&cr->conn_recovery_cmd_lock); spin_unlock(&cr->conn_recovery_cmd_lock);
spin_unlock(&sess->cr_i_lock); spin_unlock(&sess->cr_i_lock);
...@@ -616,7 +616,7 @@ int iscsit_find_cmd_for_recovery( ...@@ -616,7 +616,7 @@ int iscsit_find_cmd_for_recovery(
spin_lock(&sess->cr_a_lock); spin_lock(&sess->cr_a_lock);
list_for_each_entry(cr, &sess->cr_active_list, cr_list) { list_for_each_entry(cr, &sess->cr_active_list, cr_list) {
spin_lock(&cr->conn_recovery_cmd_lock); spin_lock(&cr->conn_recovery_cmd_lock);
list_for_each_entry(cmd, &cr->conn_recovery_cmd_list, i_list) { list_for_each_entry(cmd, &cr->conn_recovery_cmd_list, i_conn_node) {
if (cmd->init_task_tag == init_task_tag) { if (cmd->init_task_tag == init_task_tag) {
spin_unlock(&cr->conn_recovery_cmd_lock); spin_unlock(&cr->conn_recovery_cmd_lock);
spin_unlock(&sess->cr_a_lock); spin_unlock(&sess->cr_a_lock);
...@@ -1038,7 +1038,7 @@ static int iscsit_add_nopin(struct iscsi_conn *conn, int want_response) ...@@ -1038,7 +1038,7 @@ static int iscsit_add_nopin(struct iscsi_conn *conn, int want_response)
spin_unlock_bh(&conn->sess->ttt_lock); spin_unlock_bh(&conn->sess->ttt_lock);
spin_lock_bh(&conn->cmd_lock); spin_lock_bh(&conn->cmd_lock);
list_add_tail(&cmd->i_list, &conn->conn_cmd_list); list_add_tail(&cmd->i_conn_node, &conn->conn_cmd_list);
spin_unlock_bh(&conn->cmd_lock); spin_unlock_bh(&conn->cmd_lock);
if (want_response) if (want_response)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment