.. | .. |
---|
4084 | 4084 | list_for_each_entry_safe(cmd, cmd_tmp, &tmp_list, i_conn_node) { |
---|
4085 | 4085 | struct se_cmd *se_cmd = &cmd->se_cmd; |
---|
4086 | 4086 | |
---|
4087 | | - if (se_cmd->se_tfo != NULL) { |
---|
4088 | | - spin_lock_irq(&se_cmd->t_state_lock); |
---|
4089 | | - if (se_cmd->transport_state & CMD_T_ABORTED) { |
---|
| 4087 | + if (!se_cmd->se_tfo) |
---|
| 4088 | + continue; |
---|
| 4089 | + |
---|
| 4090 | + spin_lock_irq(&se_cmd->t_state_lock); |
---|
| 4091 | + if (se_cmd->transport_state & CMD_T_ABORTED) { |
---|
| 4092 | + if (!(se_cmd->transport_state & CMD_T_TAS)) |
---|
4090 | 4093 | /* |
---|
4091 | 4094 | * LIO's abort path owns the cleanup for this, |
---|
4092 | 4095 | * so put it back on the list and let |
---|
.. | .. |
---|
4094 | 4097 | */ |
---|
4095 | 4098 | list_move_tail(&cmd->i_conn_node, |
---|
4096 | 4099 | &conn->conn_cmd_list); |
---|
4097 | | - } else { |
---|
4098 | | - se_cmd->transport_state |= CMD_T_FABRIC_STOP; |
---|
4099 | | - } |
---|
4100 | | - spin_unlock_irq(&se_cmd->t_state_lock); |
---|
| 4100 | + } else { |
---|
| 4101 | + se_cmd->transport_state |= CMD_T_FABRIC_STOP; |
---|
4101 | 4102 | } |
---|
| 4103 | + spin_unlock_irq(&se_cmd->t_state_lock); |
---|
4102 | 4104 | } |
---|
4103 | 4105 | spin_unlock_bh(&conn->cmd_lock); |
---|
4104 | 4106 | |
---|
.. | .. |
---|
4383 | 4385 | iscsit_stop_time2retain_timer(sess); |
---|
4384 | 4386 | spin_unlock_bh(&se_tpg->session_lock); |
---|
4385 | 4387 | |
---|
| 4388 | + if (sess->sess_ops->ErrorRecoveryLevel == 2) |
---|
| 4389 | + iscsit_free_connection_recovery_entries(sess); |
---|
| 4390 | + |
---|
4386 | 4391 | /* |
---|
4387 | 4392 | * transport_deregister_session_configfs() will clear the |
---|
4388 | 4393 | * struct se_node_acl->nacl_sess pointer now as a iscsi_np process context |
---|
.. | .. |
---|
4409 | 4414 | } |
---|
4410 | 4415 | |
---|
4411 | 4416 | transport_deregister_session(sess->se_sess); |
---|
4412 | | - |
---|
4413 | | - if (sess->sess_ops->ErrorRecoveryLevel == 2) |
---|
4414 | | - iscsit_free_connection_recovery_entries(sess); |
---|
4415 | 4417 | |
---|
4416 | 4418 | iscsit_free_all_ooo_cmdsns(sess); |
---|
4417 | 4419 | |
---|