On Fri, Dec 23, 2011 at 1:51 PM, Nicholas A. Bellinger <nab@xxxxxxxxxxxxxxx> wrote: > So the (t_transport_complete == 0) check causing the issue above should > be safe to remove now.. The same is true for the !cmd->se_cmd.se_dev > check in tcm_qla2xxx_free_cmd() as well. Basically you're saying the following is the right fix? --- a/drivers/scsi/qla2xxx/tcm_qla2xxx.c +++ b/drivers/scsi/qla2xxx/tcm_qla2xxx.c @@ -401,21 +401,6 @@ static void tcm_qla2xxx_complete_free(struct work_struct *work) */ void tcm_qla2xxx_free_cmd(struct qla_tgt_cmd *cmd) { - barrier(); - /* - * Handle tcm_qla2xxx_init_cmd() -> transport_get_lun_for_cmd() - * failure case where cmd->se_cmd.se_dev was not assigned, and - * a call to transport_generic_free_cmd_intr() is not possible.. - */ - if (!cmd->se_cmd.se_dev) { - target_put_sess_cmd(cmd->se_cmd.se_sess, &cmd->se_cmd); - transport_generic_free_cmd(&cmd->se_cmd, 0); - return; - } - - if (!atomic_read(&cmd->se_cmd.t_transport_complete)) - target_put_sess_cmd(cmd->se_cmd.se_sess, &cmd->se_cmd); - INIT_WORK(&cmd->work, tcm_qla2xxx_complete_free); queue_work(tcm_qla2xxx_free_wq, &cmd->work); } (I'm deleting the barrier() as part of this too because it's almost certainly wrong... an indirect call through a function pointer that gets here is just as much of a compiler optimization barrier anyway). - R. -- 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