aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/target/iscsi/iscsi_target_erl2.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/target/iscsi/iscsi_target_erl2.c')
-rw-r--r--drivers/target/iscsi/iscsi_target_erl2.c28
1 files changed, 14 insertions, 14 deletions
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);