From 41e16e981679124c78c30f046d4f0b71d86ff1b2 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Wed, 23 Nov 2011 06:54:15 -0500 Subject: [PATCH] target: remove the se_task task_error_status field 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 Signed-off-by: Nicholas Bellinger --- drivers/target/target_core_transport.c | 8 +------- include/target/target_core_base.h | 1 - 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c index e13fafa6f526..ae112ac91c47 100644 --- a/drivers/target/target_core_transport.c +++ b/drivers/target/target_core_transport.c @@ -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); diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index 7f3acdde97de..e2473e6770b3 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h @@ -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;