diff options
author | Li Feng <fengli@smartx.com> | 2023-11-23 13:54:12 +0800 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2023-12-02 15:56:49 -0500 |
commit | 95e1019a4a9b4b6e2caeb3fd392525e522a747db (patch) | |
tree | 7ebe4172fa6c199f45f46eb143babfdbb3716392 /hw/virtio/virtio.c | |
parent | 298d4f892e745cfb8a33b5ed2feaaab271f6e50c (diff) |
vhost-user-scsi: free the inflight area when reset
Keep it the same to vhost-user-blk.
At the same time, fix the vhost_reset_device.
Signed-off-by: Li Feng <fengli@smartx.com>
Message-Id: <20231123055431.217792-3-fengli@smartx.com>
Reviewed-by: Raphael Norwitz <raphael.norwitz@nutanix.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/virtio/virtio.c')
-rw-r--r-- | hw/virtio/virtio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c index e5105571cf..3a160f86ed 100644 --- a/hw/virtio/virtio.c +++ b/hw/virtio/virtio.c @@ -2137,7 +2137,7 @@ void virtio_reset(void *opaque) vdev->device_endian = virtio_default_endian(); } - if (vdev->vhost_started) { + if (vdev->vhost_started && k->get_vhost) { vhost_reset_device(k->get_vhost(vdev)); } |