]> git.karo-electronics.de Git - karo-tx-linux.git/commit
vhost/scsi: Drop unnecessary wait_for_tasks=true usage with transport_generic_free_cmd
authorNicholas Bellinger <nab@linux-iscsi.org>
Thu, 6 Jun 2013 08:44:48 +0000 (01:44 -0700)
committerNicholas Bellinger <nab@linux-iscsi.org>
Fri, 14 Jun 2013 07:28:31 +0000 (00:28 -0700)
commit60c3b6f7d3569896aabcded71c8e00da5f5020dd
treeab448cd778dec89fd03ff5f06a86963eb4c455e4
parentc5ff1a773279bdb10815f85f479916a73b6ec95e
vhost/scsi: Drop unnecessary wait_for_tasks=true usage with transport_generic_free_cmd

This patch changes vhost_scsi_free_cmd() to call transport_generic_free_cmd()
with wait_for_tasks=false in order to avoid the extra se_cmd->t_state_lock
access for the wait_for_tasks=true case.

This is unnecessary because vhost_scsi_free_cmd() is only ever called by
vhost_scsi_complete_cmd_work() after TCM completion handoff, and by
vhost_scsi_handle_vq() exception code before TCM submission handoff, so
there is never a case where se_cmd is still active from TCM's perspective
when transport_generic_free_cmd() is called.

Cc: Christoph Hellwig <hch@lst.de>
Cc: Roland Dreier <roland@kernel.org>
Cc: Kent Overstreet <koverstreet@google.com>
Cc: Asias He <asias@redhat.com>
Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: Or Gerlitz <ogerlitz@mellanox.com>
Cc: Moussa Ba <moussaba@micron.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/vhost/scsi.c