> + sess = cmd->se_sess; > + if (WARN_ON_ONCE(!sess)) > + continue; > + > + spin_lock(&sess->sess_cmd_lock); > spin_lock(&cmd->t_state_lock); > if (!(cmd->transport_state & CMD_T_ACTIVE)) { > spin_unlock(&cmd->t_state_lock); > + spin_unlock(&sess->sess_cmd_lock); > continue; > } > if (cmd->t_state == TRANSPORT_ISTATE_PROCESSING) { > spin_unlock(&cmd->t_state_lock); > + spin_unlock(&sess->sess_cmd_lock); > continue; > } > + cmd->transport_state |= CMD_T_ABORTED; > spin_unlock(&cmd->t_state_lock); > > + rc = kref_get_unless_zero(&cmd->cmd_kref); > + spin_unlock(&sess->sess_cmd_lock); Similar to the previous patch I don't understand the need for sess_cmd_lock here. > + spin_lock_irqsave(&cmd->t_state_lock, flags); > + if (cmd->transport_state & CMD_T_ABORTED) { > + tmr->response = TMR_FUNCTION_REJECTED; > + spin_unlock_irqrestore(&cmd->t_state_lock, flags); > + goto check_stop; > + } > + spin_unlock_irqrestore(&cmd->t_state_lock, flags); Taking a lock for checking a single bit is pointless. -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html