]> git.karo-electronics.de Git - karo-tx-linux.git/commit
target: Avoid extra t_state_lock access in __target_execute_cmd
authorNicholas Bellinger <nab@linux-iscsi.org>
Thu, 6 Jun 2013 08:40:27 +0000 (01:40 -0700)
committerNicholas Bellinger <nab@linux-iscsi.org>
Fri, 14 Jun 2013 07:28:28 +0000 (00:28 -0700)
commit8d4d89d2e1f94b6a77ab86f480d1f6eaf882d7f9
treeb30195f1e1d171629f6efa0ae75c753c7e223906
parent899c26e64bb8ba83fda822fefdc8d62e32f8ab43
target: Avoid extra t_state_lock access in __target_execute_cmd

This patch makes target_execute_cmd() set CMD_T_BUSY|CMD_T_SENT while
holding se_cmd->t_state_lock, in order to avoid the extra aquire/release
in __target_execute_cmd().

It also clears these bits in case of a target_handle_task_attr()
failure.

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