diff options
author | Nicholas Bellinger <nab@linux-iscsi.org> | 2013-06-06 01:44:48 -0700 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2013-06-20 14:10:46 -0700 |
commit | 6c131d0c583cd5ceb2b497ae2dbeeae180d3573d (patch) | |
tree | b286807455ba65c4da5b36b772cfda2ce23617df /drivers/vhost | |
parent | ca24976ac815aeb17bf1707a96231409c57afac2 (diff) |
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>
Diffstat (limited to 'drivers/vhost')
-rw-r--r-- | drivers/vhost/scsi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/vhost/scsi.c b/drivers/vhost/scsi.c index 70142029722..aacf71ea001 100644 --- a/drivers/vhost/scsi.c +++ b/drivers/vhost/scsi.c @@ -557,7 +557,7 @@ static void vhost_scsi_free_cmd(struct tcm_vhost_cmd *tv_cmd) struct se_cmd *se_cmd = &tv_cmd->tvc_se_cmd; /* TODO locking against target/backend threads? */ - transport_generic_free_cmd(se_cmd, 1); + transport_generic_free_cmd(se_cmd, 0); if (tv_cmd->tvc_sgl_count) { u32 i; |