summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAsias He <asias@redhat.com>2013-03-15 09:14:06 +0800
committerNicholas Bellinger <nab@linux-iscsi.org>2013-03-18 14:34:49 -0700
commit72c77539fd56f5ba8dd538df9f3ce0e331fe601c (patch)
tree205dd94cfcb952d329020afda6518b40c50d52a8
parent038e0af4a4fc4db9631aef39ab53e5d991b972ef (diff)
downloadlinux-72c77539fd56f5ba8dd538df9f3ce0e331fe601c.tar.gz
linux-72c77539fd56f5ba8dd538df9f3ce0e331fe601c.tar.bz2
linux-72c77539fd56f5ba8dd538df9f3ce0e331fe601c.zip
tcm_vhost: Flush vhost_work in vhost_scsi_flush()
We also need to flush the vhost_works. It is the completion vhost_work currently. Signed-off-by: Asias He <asias@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
-rw-r--r--drivers/vhost/tcm_vhost.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/vhost/tcm_vhost.c b/drivers/vhost/tcm_vhost.c
index 79d3aeaff8fa..43fb11ee2e8d 100644
--- a/drivers/vhost/tcm_vhost.c
+++ b/drivers/vhost/tcm_vhost.c
@@ -941,6 +941,7 @@ static void vhost_scsi_flush(struct vhost_scsi *vs)
for (i = 0; i < VHOST_SCSI_MAX_VQ; i++)
vhost_scsi_flush_vq(vs, i);
+ vhost_work_flush(&vs->dev, &vs->vs_completion_work);
}
static int vhost_scsi_set_features(struct vhost_scsi *vs, u64 features)