mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
virtio_console: Free buffers from out-queue upon close
Free pending output buffers from the virtio out-queue when host has acknowledged port_close. Signed-off-by: Sjur Brændeland <[email protected]> Signed-off-by: Rusty Russell <[email protected]> (rebased & cut down)
This commit is contained in:
parent
800ba5eabf
commit
eb34f12b50
1 changed files with 4 additions and 0 deletions
|
|
@ -1439,6 +1439,10 @@ static void remove_port_data(struct port *port)
|
|||
/* Remove buffers we queued up for the Host to send us data in. */
|
||||
while ((buf = virtqueue_detach_unused_buf(port->in_vq)))
|
||||
free_buf(buf);
|
||||
|
||||
/* Free pending buffers from the out-queue. */
|
||||
while ((buf = virtqueue_detach_unused_buf(port->out_vq)))
|
||||
free_buf(buf);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in a new issue