Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 202649
b: refs/heads/master
c: dd1f407
h: refs/heads/master
i:
  202647: 9c5d7d3
v: v3
  • Loading branch information
Jeff Dike authored and Michael S. Tsirkin committed May 27, 2010
1 parent 7c85bd6 commit d999482
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 373a83a6997bfdaf767f6a65fc5cc0054b246984
refs/heads/master: dd1f4078f0d2de74a308f00a2dffbd550cfba59f
11 changes: 5 additions & 6 deletions trunk/drivers/vhost/net.c
Original file line number Diff line number Diff line change
Expand Up @@ -519,13 +519,12 @@ static long vhost_net_set_backend(struct vhost_net *n, unsigned index, int fd)

/* start polling new socket */
oldsock = vq->private_data;
if (sock == oldsock)
goto done;
if (sock != oldsock){
vhost_net_disable_vq(n, vq);
rcu_assign_pointer(vq->private_data, sock);
vhost_net_enable_vq(n, vq);
}

vhost_net_disable_vq(n, vq);
rcu_assign_pointer(vq->private_data, sock);
vhost_net_enable_vq(n, vq);
done:
if (oldsock) {
vhost_net_flush_vq(n, index);
fput(oldsock->file);
Expand Down

0 comments on commit d999482

Please sign in to comment.