]> git.karo-electronics.de Git - karo-tx-linux.git/commit
target: Drop unnecessary CMD_T_DEV_ACTIVE check from transport_lun_remove_cmd
authorNicholas Bellinger <nab@linux-iscsi.org>
Thu, 6 Jun 2013 08:36:41 +0000 (01:36 -0700)
committerNicholas Bellinger <nab@linux-iscsi.org>
Fri, 14 Jun 2013 07:28:27 +0000 (00:28 -0700)
commit601e6316684df3af0f9902471de6e7b4bc4f4e98
treea3c3ddbd6444c6b27d211a517ca4ec3448598428
parentace3d8648781acb24e756b300017a6d9132cb6f5
target: Drop unnecessary CMD_T_DEV_ACTIVE check from transport_lun_remove_cmd

This patch drops an unnecessary acquire/release of se_cmd->t_state_lock within
transport_lun_remove_cmd() when checking CMD_T_DEV_ACTIVE for invoking
target_remove_from_state_list().

For all fast path completion cases, transport_lun_remove_cmd() is always
called ahead of transport_cmd_check_stop(), and since transport_cmd_check_stop()
is calling target_remove_from_state_list() when remove_from_lists=true,
the t_state_lock usage in transport_lun_remove_cmd() can safely be removed.

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>
drivers/target/target_core_transport.c