diff options
author | Nicholas Bellinger <nab@linux-iscsi.org> | 2013-06-06 02:00:06 -0700 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2013-06-20 14:10:41 -0700 |
commit | c1c35d52251b0941a72b0cdb862e85f0eba6b1bb (patch) | |
tree | 941167898cf8425a95dafb4c6e6f35e248150aa9 /drivers/target/target_core_transport.c | |
parent | 0b66818ac6de67a6125ae203272fb76e79b3a20f (diff) |
target: Remove legacy t_fe_count + avoid t_state_lock access in transport_put_cmd
This patch removes legacy se_cmd->t_fe_count usage in order to avoid
se_cmd->t_state_lock access within transport_put_cmd() during normal
fast path se_cmd descriptor release.
Also drop the left-over parameter usage within core_tmr_handle_tas_abort()
Cc: Christoph Hellwig <hch@lst.de>
Cc: Roland Dreier <roland@kernel.org>
Cc: Kent Overstreet <koverstreet@google.com>
Cc: Or Gerlitz <ogerlitz@mellanox.com>
Cc: Moussa Ba <moussaba@micron.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/target_core_transport.c')
-rw-r--r-- | drivers/target/target_core_transport.c | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c index bc37666bc941..01cdee47f75e 100644 --- a/drivers/target/target_core_transport.c +++ b/drivers/target/target_core_transport.c @@ -1968,21 +1968,6 @@ static int transport_release_cmd(struct se_cmd *cmd) */ static int transport_put_cmd(struct se_cmd *cmd) { - unsigned long flags; - - spin_lock_irqsave(&cmd->t_state_lock, flags); - if (atomic_read(&cmd->t_fe_count) && - !atomic_dec_and_test(&cmd->t_fe_count)) { - spin_unlock_irqrestore(&cmd->t_state_lock, flags); - return 0; - } - - if (cmd->transport_state & CMD_T_DEV_ACTIVE) { - cmd->transport_state &= ~CMD_T_DEV_ACTIVE; - target_remove_from_state_list(cmd); - } - spin_unlock_irqrestore(&cmd->t_state_lock, flags); - transport_free_pages(cmd); return transport_release_cmd(cmd); } @@ -2100,9 +2085,6 @@ transport_generic_new_cmd(struct se_cmd *cmd) if (ret < 0) return TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE; } - - atomic_inc(&cmd->t_fe_count); - /* * If this command is not a write we can execute it right here, * for write buffers we need to notify the fabric driver first |