diff options
| author | Christoph Hellwig <hch@infradead.org> | 2012-04-24 00:25:09 -0400 |
|---|---|---|
| committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2012-05-06 18:11:28 -0400 |
| commit | d5dc28eb92f2a2305a02cb3a5f1ed36542d47512 (patch) | |
| tree | 97f2721b2eaa270a329d4dd556cd254a94bdb41b | |
| parent | d43d6aea844e66b847e3a0e5cb2c24b6ba84908a (diff) | |
target: remove the t_se_count field in struct se_cmd
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>
| -rw-r--r-- | drivers/target/target_core_transport.c | 6 | ||||
| -rw-r--r-- | include/target/target_core_base.h | 1 |
2 files changed, 0 insertions, 7 deletions
diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c index d110ead38721..5c06b87a3114 100644 --- a/drivers/target/target_core_transport.c +++ b/drivers/target/target_core_transport.c | |||
| @@ -3284,11 +3284,6 @@ static void transport_put_cmd(struct se_cmd *cmd) | |||
| 3284 | goto out_busy; | 3284 | goto out_busy; |
| 3285 | } | 3285 | } |
| 3286 | 3286 | ||
| 3287 | if (atomic_read(&cmd->t_se_count)) { | ||
| 3288 | if (!atomic_dec_and_test(&cmd->t_se_count)) | ||
| 3289 | goto out_busy; | ||
| 3290 | } | ||
| 3291 | |||
| 3292 | if (cmd->transport_state & CMD_T_DEV_ACTIVE) { | 3287 | if (cmd->transport_state & CMD_T_DEV_ACTIVE) { |
| 3293 | cmd->transport_state &= ~CMD_T_DEV_ACTIVE; | 3288 | cmd->transport_state &= ~CMD_T_DEV_ACTIVE; |
| 3294 | target_remove_from_state_list(cmd); | 3289 | target_remove_from_state_list(cmd); |
| @@ -3498,7 +3493,6 @@ int transport_generic_new_cmd(struct se_cmd *cmd) | |||
| 3498 | } | 3493 | } |
| 3499 | 3494 | ||
| 3500 | atomic_inc(&cmd->t_fe_count); | 3495 | atomic_inc(&cmd->t_fe_count); |
| 3501 | atomic_inc(&cmd->t_se_count); | ||
| 3502 | 3496 | ||
| 3503 | /* | 3497 | /* |
| 3504 | * For WRITEs, let the fabric know its buffer is ready. | 3498 | * For WRITEs, let the fabric know its buffer is ready. |
diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index 6c83b14b3075..927771aff1f7 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h | |||
| @@ -548,7 +548,6 @@ struct se_cmd { | |||
| 548 | unsigned char __t_task_cdb[TCM_MAX_COMMAND_SIZE]; | 548 | unsigned char __t_task_cdb[TCM_MAX_COMMAND_SIZE]; |
| 549 | unsigned long long t_task_lba; | 549 | unsigned long long t_task_lba; |
| 550 | atomic_t t_fe_count; | 550 | atomic_t t_fe_count; |
| 551 | atomic_t t_se_count; | ||
| 552 | unsigned int transport_state; | 551 | unsigned int transport_state; |
| 553 | #define CMD_T_ABORTED (1 << 0) | 552 | #define CMD_T_ABORTED (1 << 0) |
| 554 | #define CMD_T_ACTIVE (1 << 1) | 553 | #define CMD_T_ACTIVE (1 << 1) |
