Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Christoph Hellwig and committed by
Nicholas Bellinger
d5dc28eb d43d6aea

-7
-6
drivers/target/target_core_transport.c
··· 3284 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 3287 if (cmd->transport_state & CMD_T_DEV_ACTIVE) { 3293 3288 cmd->transport_state &= ~CMD_T_DEV_ACTIVE; 3294 3289 target_remove_from_state_list(cmd); ··· 3493 3498 } 3494 3499 3495 3500 atomic_inc(&cmd->t_fe_count); 3496 - atomic_inc(&cmd->t_se_count); 3497 3501 3498 3502 /* 3499 3503 * For WRITEs, let the fabric know its buffer is ready.
-1
include/target/target_core_base.h
··· 548 548 unsigned char __t_task_cdb[TCM_MAX_COMMAND_SIZE]; 549 549 unsigned long long t_task_lba; 550 550 atomic_t t_fe_count; 551 - atomic_t t_se_count; 552 551 unsigned int transport_state; 553 552 #define CMD_T_ABORTED (1 << 0) 554 553 #define CMD_T_ACTIVE (1 << 1)