]> git.karo-electronics.de Git - karo-tx-linux.git/commit
vhost/scsi: Convert to se_cmd->cmd_kref TARGET_SCF_ACK_KREF usage
authorNicholas Bellinger <nab@linux-iscsi.org>
Thu, 6 Jun 2013 09:20:41 +0000 (02:20 -0700)
committerNicholas Bellinger <nab@linux-iscsi.org>
Fri, 14 Jun 2013 07:28:31 +0000 (00:28 -0700)
commitbed5146e96cddfb14630563587518c7939ea48ad
tree8236a8155bf2c55c47f99633d459755ccc4cd1b6
parent60c3b6f7d3569896aabcded71c8e00da5f5020dd
vhost/scsi: Convert to se_cmd->cmd_kref TARGET_SCF_ACK_KREF usage

This patch coverts vhost/scsi to se_cmd->cmd_kref TARGET_SCF_ACK_KREF
usage, instead of assuming that vhost_scsi_free_cmd() is always called
before TCM processing is completed in the response fast path.

This includes adding vhost_scsi_check_stop_free() -> target_put_sess_cmd()
to perform the second se_cmd->cmd_kref put, and moving vhost_scsi_free_cmd()
resource release into tcm_vhost_release_cmd() that is invoked once the last
se_cmd->cmd_kref put occurs.

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