| Submitter | Jes Sorensen |
|---|---|
| Date | Sept. 14, 2010, 10:06 a.m. |
| Message ID | <1284458772-6474-1-git-send-email-Jes.Sorensen@redhat.com> |
| Download | mbox | patch |
| Permalink | /patch/64687/ |
| State | New |
| Headers | show |
Comments
Patch
diff --git a/hw/vhost_net.c b/hw/vhost_net.c index 4a7b819..b1f8072 100644 --- a/hw/vhost_net.c +++ b/hw/vhost_net.c @@ -151,10 +151,10 @@ int vhost_net_start(struct vhost_net *net, return 0; fail: file.fd = -1; - while (--file.index >= 0) { + do { int r = ioctl(net->dev.control, VHOST_NET_SET_BACKEND, &file); assert(r >= 0); - } + } while (file.index-- > 0); net->vc->info->poll(net->vc, true); vhost_dev_stop(&net->dev, dev); if (net->dev.acked_features & (1 << VIRTIO_NET_F_MRG_RXBUF)) {