summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMike Christie <michael.christie@oracle.com>2022-05-17 13:08:49 -0500
committerMichael S. Tsirkin <mst@redhat.com>2022-05-31 12:45:10 -0400
commitf3a1aad9a448e40d4833913cbd50aeec538a74fe (patch)
treea603ca10379cb066700953d6d112f86736a164ba /drivers
parentc3d284cf789ddf7a99ed7f414092ed9ea75aa883 (diff)
vhost-test: drop flush after vhost_dev_cleanup
The flush after vhost_dev_cleanup is not needed because: 1. It doesn't do anything. vhost_dev_cleanup will stop the worker thread so the flush call will just return since the worker has not device. 2. It's not needed. The comment about jobs re-queueing themselves does not look correct because handle_vq does not requeue work. Signed-off-by: Mike Christie <michael.christie@oracle.com> Acked-by: Jason Wang <jasowang@redhat.com> Message-Id: <20220517180850.198915-8-michael.christie@oracle.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/vhost/test.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/vhost/test.c b/drivers/vhost/test.c
index de39151366c5..6c139f18bc54 100644
--- a/drivers/vhost/test.c
+++ b/drivers/vhost/test.c
@@ -158,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;