History

vhost_vsock: simplify vhost_vsock_flush()

vhost_vsock_flush() calls vhost_work_dev_flush(vsock->vqs[i].poll.dev) before vhost_work_dev_flush(&vsock->dev). This seems pointless as vsock->vqs[i].poll.dev is the same as &vsock->dev and several flushes in a row doesn't do anything useful, one is just enough.

Andrey Ryabinin committed 4 years ago

Commit 15538ba1 parent c5514751 file · +0 −5Browse files

Unified · Split

drivers/vhost/vsock.c+0−5
@@ -705,11 +705,6 @@ out: · 704 unmodified lines
705 705
706static void vhost_vsock_flush(struct vhost_vsock *vsock)706static void vhost_vsock_flush(struct vhost_vsock *vsock)
707{707{
708 int i;
709
710 for (i = 0; i < ARRAY_SIZE(vsock->vqs); i++)
711 if (vsock->vqs[i].handle_kick)
712 vhost_work_dev_flush(vsock->vqs[i].poll.dev);
713 vhost_work_dev_flush(&vsock->dev);708 vhost_work_dev_flush(&vsock->dev);
714}709}
715 710

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t