[PATCH 7/7] target: remove the t_se_count field in struct se_cmd

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

 



Now that tasks are gone we are guaranteed to only get a single completion
per command, and thus don't need this counter.

Signed-off-by: Christoph Hellwig <hch@xxxxxx>

---
 drivers/target/target_core_transport.c |    6 ------
 include/target/target_core_base.h      |    1 -
 2 files changed, 7 deletions(-)

Index: lio-core/drivers/target/target_core_transport.c
===================================================================
--- lio-core.orig/drivers/target/target_core_transport.c	2012-04-24 06:11:36.920374369 +0200
+++ lio-core/drivers/target/target_core_transport.c	2012-04-24 06:12:11.292375249 +0200
@@ -3280,11 +3280,6 @@ static void transport_put_cmd(struct se_
 			goto out_busy;
 	}
 
-	if (atomic_read(&cmd->t_se_count)) {
-		if (!atomic_dec_and_test(&cmd->t_se_count))
-			goto out_busy;
-	}
-
 	if (cmd->transport_state & CMD_T_DEV_ACTIVE) {
 		cmd->transport_state &= ~CMD_T_DEV_ACTIVE;
 		target_remove_from_state_list(cmd);
@@ -3494,7 +3489,6 @@ int transport_generic_new_cmd(struct se_
 	}
 
 	atomic_inc(&cmd->t_fe_count);
-	atomic_inc(&cmd->t_se_count);
 
 	/*
 	 * For WRITEs, let the fabric know its buffer is ready.
Index: lio-core/include/target/target_core_base.h
===================================================================
--- lio-core.orig/include/target/target_core_base.h	2012-04-24 06:11:36.924374369 +0200
+++ lio-core/include/target/target_core_base.h	2012-04-24 06:12:11.296375249 +0200
@@ -548,7 +548,6 @@ struct se_cmd {
 	unsigned char		__t_task_cdb[TCM_MAX_COMMAND_SIZE];
 	unsigned long long	t_task_lba;
 	atomic_t		t_fe_count;
-	atomic_t		t_se_count;
 	unsigned int		transport_state;
 #define CMD_T_ABORTED		(1 << 0)
 #define CMD_T_ACTIVE		(1 << 1)

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