target: remove the se_task task_error_status field
authorChristoph Hellwig <hch@infradead.org>
Wed, 23 Nov 2011 11:54:15 +0000 (06:54 -0500)
committerNicholas Bellinger <nab@linux-iscsi.org>
Wed, 14 Dec 2011 11:26:44 +0000 (11:26 +0000)
We only reach transport_complete_task once per task, so the test and set on
task_error_status is never going to have an effect.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/target_core_transport.c
include/target/target_core_base.h

index e13fafa6f526bc4877aa37b80786e8053e23cc75..ae112ac91c47037da774f8d29d86d63f5d19ea5d 100644 (file)
@@ -738,13 +738,7 @@ void transport_complete_task(struct se_task *task, int success)
        }
 
        if (cmd->t_tasks_failed) {
-               if (!task->task_error_status) {
-                       task->task_error_status =
-                               TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE;
-                       cmd->scsi_sense_reason =
-                               TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE;
-               }
-
+               cmd->scsi_sense_reason = TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE;
                INIT_WORK(&cmd->work, target_complete_failure_work);
        } else {
                atomic_set(&cmd->t_transport_complete, 1);
index 7f3acdde97ded85bd7e3a8b2b348679f6767ff59..e2473e6770b3d828a8c0cc75c69a6ebd2af35aad 100644 (file)
@@ -490,7 +490,6 @@ struct se_task {
        u32                     task_sg_nents;
        u16                     task_flags;
        u8                      task_scsi_status;
-       int                     task_error_status;
        enum dma_data_direction task_data_direction;
        atomic_t                task_state_active;
        struct list_head        t_list;