Commit 446374d7 authored by Michael S. Tsirkin's avatar Michael S. Tsirkin

vhost/test: fix after swiotlb changes

Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
parent 21bc54fc
...@@ -220,20 +220,20 @@ static long vhost_test_reset_owner(struct vhost_test *n) ...@@ -220,20 +220,20 @@ static long vhost_test_reset_owner(struct vhost_test *n)
{ {
void *priv = NULL; void *priv = NULL;
long err; long err;
struct vhost_memory *memory; struct vhost_umem *umem;
mutex_lock(&n->dev.mutex); mutex_lock(&n->dev.mutex);
err = vhost_dev_check_owner(&n->dev); err = vhost_dev_check_owner(&n->dev);
if (err) if (err)
goto done; goto done;
memory = vhost_dev_reset_owner_prepare(); umem = vhost_dev_reset_owner_prepare();
if (!memory) { if (!umem) {
err = -ENOMEM; err = -ENOMEM;
goto done; goto done;
} }
vhost_test_stop(n, &priv); vhost_test_stop(n, &priv);
vhost_test_flush(n); vhost_test_flush(n);
vhost_dev_reset_owner(&n->dev, memory); vhost_dev_reset_owner(&n->dev, umem);
done: done:
mutex_unlock(&n->dev.mutex); mutex_unlock(&n->dev.mutex);
return err; return err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment