On Sun, May 15, 2022 at 03:29:17PM -0500, Mike Christie wrote:
From: Andrey Ryabinin <[email protected]>

vhost_net_flush_vq() calls vhost_work_dev_flush() twice passing
vhost_dev pointer obtained via 'n->poll[index].dev' and
'n->vqs[index].vq.poll.dev'. This is actually the same pointer,
initialized in vhost_net_open()/vhost_dev_init()/vhost_poll_init()

Remove vhost_net_flush_vq() and call vhost_work_dev_flush() directly.
Do the flushes only once instead of several flush calls in a row
which seems rather useless.

Signed-off-by: Andrey Ryabinin <[email protected]>
[drop vhost_dev forward declaration in vhost.h]
Signed-off-by: Mike Christie <[email protected]>
---
drivers/vhost/net.c | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)

Reviewed-by: Stefano Garzarella <[email protected]>

_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Reply via email to