提交 24bfa207 编写于 作者: J Jason Wang 提交者: Michael S. Tsirkin

vhost: put log correctly in vhost_dev_start()

We allocate an dummy log even if the size is zero. So we should put it
unconditionally too.
Signed-off-by: NJason Wang <jasowang@redhat.com>
Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
上级 309750fa
...@@ -1111,9 +1111,7 @@ int vhost_dev_start(struct vhost_dev *hdev, VirtIODevice *vdev) ...@@ -1111,9 +1111,7 @@ int vhost_dev_start(struct vhost_dev *hdev, VirtIODevice *vdev)
return 0; return 0;
fail_log: fail_log:
if (hdev->log_size) {
vhost_log_put(hdev, false); vhost_log_put(hdev, false);
}
fail_vq: fail_vq:
while (--i >= 0) { while (--i >= 0) {
vhost_virtqueue_stop(hdev, vhost_virtqueue_stop(hdev,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册