net.c (4364d5f96eed7994a2c625bd9216656e55fba0cb) | net.c (05c05351943cc03bf5c77e86953b24ae6fb21368) |
---|---|
1/* Copyright (C) 2009 Red Hat, Inc. 2 * Author: Michael S. Tsirkin <mst@redhat.com> 3 * 4 * This work is licensed under the terms of the GNU GPL, version 2. 5 * 6 * virtio-net server in host kernel. 7 */ 8 --- 1040 unchanged lines hidden (view full) --- 1049 return 0; 1050} 1051 1052static long vhost_net_set_owner(struct vhost_net *n) 1053{ 1054 int r; 1055 1056 mutex_lock(&n->dev.mutex); | 1/* Copyright (C) 2009 Red Hat, Inc. 2 * Author: Michael S. Tsirkin <mst@redhat.com> 3 * 4 * This work is licensed under the terms of the GNU GPL, version 2. 5 * 6 * virtio-net server in host kernel. 7 */ 8 --- 1040 unchanged lines hidden (view full) --- 1049 return 0; 1050} 1051 1052static long vhost_net_set_owner(struct vhost_net *n) 1053{ 1054 int r; 1055 1056 mutex_lock(&n->dev.mutex); |
1057 if (vhost_dev_has_owner(&n->dev)) { 1058 r = -EBUSY; 1059 goto out; 1060 } |
|
1057 r = vhost_net_set_ubuf_info(n); 1058 if (r) 1059 goto out; 1060 r = vhost_dev_set_owner(&n->dev); 1061 if (r) 1062 vhost_net_clear_ubuf_info(n); 1063 vhost_net_flush(n); 1064out: --- 91 unchanged lines hidden --- | 1061 r = vhost_net_set_ubuf_info(n); 1062 if (r) 1063 goto out; 1064 r = vhost_dev_set_owner(&n->dev); 1065 if (r) 1066 vhost_net_clear_ubuf_info(n); 1067 vhost_net_flush(n); 1068out: --- 91 unchanged lines hidden --- |