[PATCH 3/3] target: remove the se_task task_error_status field

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxx>

Index: lio-core/drivers/target/target_core_transport.c
===================================================================
--- lio-core.orig/drivers/target/target_core_transport.c	2011-11-23 12:23:29.608611844 +0100
+++ lio-core/drivers/target/target_core_transport.c	2011-11-23 12:34:56.288225115 +0100
@@ -739,13 +739,7 @@ void transport_complete_task(struct se_t
 	}
 
 	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: lio-core/include/target/target_core_base.h
===================================================================
--- lio-core.orig/include/target/target_core_base.h	2011-11-23 12:23:29.631945052 +0100
+++ lio-core/include/target/target_core_base.h	2011-11-23 12:25:09.688069666 +0100
@@ -491,7 +491,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;
--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux