LoongArch: Parse MADT to get multi-processor information
[linux-2.6-microblaze.git] / drivers / vhost / test.c
index 05740cb..bc8e7fb 100644 (file)
@@ -144,14 +144,9 @@ static void vhost_test_stop(struct vhost_test *n, void **privatep)
        *privatep = vhost_test_stop_vq(n, n->vqs + VHOST_TEST_VQ);
 }
 
-static void vhost_test_flush_vq(struct vhost_test *n, int index)
-{
-       vhost_poll_flush(&n->vqs[index].poll);
-}
-
 static void vhost_test_flush(struct vhost_test *n)
 {
-       vhost_test_flush_vq(n, VHOST_TEST_VQ);
+       vhost_dev_flush(&n->dev);
 }
 
 static int vhost_test_release(struct inode *inode, struct file *f)
@@ -163,9 +158,6 @@ static int vhost_test_release(struct inode *inode, struct file *f)
        vhost_test_flush(n);
        vhost_dev_stop(&n->dev);
        vhost_dev_cleanup(&n->dev);
-       /* We do an extra flush before freeing memory,
-        * since jobs can re-queue themselves. */
-       vhost_test_flush(n);
        kfree(n->dev.vqs);
        kfree(n);
        return 0;
@@ -210,7 +202,7 @@ static long vhost_test_run(struct vhost_test *n, int test)
                        goto err;
 
                if (oldpriv) {
-                       vhost_test_flush_vq(n, index);
+                       vhost_test_flush(n);
                }
        }
 
@@ -303,7 +295,7 @@ static long vhost_test_set_backend(struct vhost_test *n, unsigned index, int fd)
        mutex_unlock(&vq->mutex);
 
        if (enable) {
-               vhost_test_flush_vq(n, index);
+               vhost_test_flush(n);
        }
 
        mutex_unlock(&n->dev.mutex);