Skip to content

Commit 0f26806

Browse files
mstsirkinbwhacks
authored andcommitted
virtio_console: drop custom control queue cleanup
commit 61a8950 upstream. We now cleanup all VQs on device removal - no need to handle the control VQ specially. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
1 parent f92b16b commit 0f26806

1 file changed

Lines changed: 0 additions & 17 deletions

File tree

drivers/char/virtio_console.c

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1980,21 +1980,6 @@ static void remove_vqs(struct ports_device *portdev)
19801980
kfree(portdev->out_vqs);
19811981
}
19821982

1983-
static void remove_controlq_data(struct ports_device *portdev)
1984-
{
1985-
struct port_buffer *buf;
1986-
unsigned int len;
1987-
1988-
if (!use_multiport(portdev))
1989-
return;
1990-
1991-
while ((buf = virtqueue_get_buf(portdev->c_ivq, &len)))
1992-
free_buf(buf, true);
1993-
1994-
while ((buf = virtqueue_detach_unused_buf(portdev->c_ivq)))
1995-
free_buf(buf, true);
1996-
}
1997-
19981983
/*
19991984
* Once we're further in boot, we get probed like any other virtio
20001985
* device.
@@ -2144,7 +2129,6 @@ static void virtcons_remove(struct virtio_device *vdev)
21442129
* have to just stop using the port, as the vqs are going
21452130
* away.
21462131
*/
2147-
remove_controlq_data(portdev);
21482132
remove_vqs(portdev);
21492133
kfree(portdev);
21502134
}
@@ -2189,7 +2173,6 @@ static int virtcons_freeze(struct virtio_device *vdev)
21892173
*/
21902174
if (use_multiport(portdev))
21912175
virtqueue_disable_cb(portdev->c_ivq);
2192-
remove_controlq_data(portdev);
21932176

21942177
list_for_each_entry(port, &portdev->ports, list) {
21952178
virtqueue_disable_cb(port->in_vq);

0 commit comments

Comments
 (0)