tcm_vhost: Flush vhost_work in vhost_scsi_flush()
authorAsias He <asias@redhat.com>
Fri, 15 Mar 2013 01:14:06 +0000 (09:14 +0800)
committerNicholas Bellinger <nab@linux-iscsi.org>
Mon, 18 Mar 2013 21:34:49 +0000 (14:34 -0700)
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>
drivers/vhost/tcm_vhost.c

index 79d3aeaff8fa6d07a7ae2e1fdbbe1972f895df73..43fb11ee2e8ded2cc2c70b954e3b68bdc06e1760 100644 (file)
@@ -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)