target: remove the t_se_count field in struct se_cmd
authorChristoph Hellwig <hch@infradead.org>
Tue, 24 Apr 2012 04:25:09 +0000 (00:25 -0400)
committerNicholas Bellinger <nab@linux-iscsi.org>
Sun, 6 May 2012 22:11:28 +0000 (15:11 -0700)
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@lst.de>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/target_core_transport.c
include/target/target_core_base.h

index d110ead38721dbcf7aaa87337c7794753716a23c..5c06b87a3114aad01a4c2949bea3e73cd04260f2 100644 (file)
@@ -3284,11 +3284,6 @@ static void transport_put_cmd(struct se_cmd *cmd)
                        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);
@@ -3498,7 +3493,6 @@ int transport_generic_new_cmd(struct se_cmd *cmd)
        }
 
        atomic_inc(&cmd->t_fe_count);
-       atomic_inc(&cmd->t_se_count);
 
        /*
         * For WRITEs, let the fabric know its buffer is ready.
index 6c83b14b307533963dd6dd3b1b3d8666012722b5..927771aff1f7aa864f8d926fe4839c7465c7cb49 100644 (file)
@@ -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)