diff options
author | David S. Miller <davem@davemloft.net> | 2010-07-16 15:41:44 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-07-16 15:41:44 -0400 |
commit | 0f6142fa96a4ce799ccaa4cdb38fc4a715eb9d35 (patch) | |
tree | 1bdd2d99caa46a0545bc0b2d3987fa5986e6dcb9 /drivers | |
parent | e40dbc51fbcc3281bb52ecf0f5bec693d36e2aea (diff) | |
parent | 95c0ec6a97ae82d39a6e13fc01aa76861a4a76d0 (diff) |
Merge branch 'vhost-net' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/vhost/net.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index 2406377a6e5e..2f6185c845e0 100644 --- a/drivers/vhost/net.c +++ b/drivers/vhost/net.c | |||
@@ -177,8 +177,8 @@ static void handle_tx(struct vhost_net *net) | |||
177 | break; | 177 | break; |
178 | } | 178 | } |
179 | if (err != len) | 179 | if (err != len) |
180 | pr_err("Truncated TX packet: " | 180 | pr_debug("Truncated TX packet: " |
181 | " len %d != %zd\n", err, len); | 181 | " len %d != %zd\n", err, len); |
182 | vhost_add_used_and_signal(&net->dev, vq, head, 0); | 182 | vhost_add_used_and_signal(&net->dev, vq, head, 0); |
183 | total_len += len; | 183 | total_len += len; |
184 | if (unlikely(total_len >= VHOST_NET_WEIGHT)) { | 184 | if (unlikely(total_len >= VHOST_NET_WEIGHT)) { |
@@ -275,8 +275,8 @@ static void handle_rx(struct vhost_net *net) | |||
275 | } | 275 | } |
276 | /* TODO: Should check and handle checksum. */ | 276 | /* TODO: Should check and handle checksum. */ |
277 | if (err > len) { | 277 | if (err > len) { |
278 | pr_err("Discarded truncated rx packet: " | 278 | pr_debug("Discarded truncated rx packet: " |
279 | " len %d > %zd\n", err, len); | 279 | " len %d > %zd\n", err, len); |
280 | vhost_discard_vq_desc(vq); | 280 | vhost_discard_vq_desc(vq); |
281 | continue; | 281 | continue; |
282 | } | 282 | } |
@@ -534,11 +534,16 @@ static long vhost_net_set_backend(struct vhost_net *n, unsigned index, int fd) | |||
534 | rcu_assign_pointer(vq->private_data, sock); | 534 | rcu_assign_pointer(vq->private_data, sock); |
535 | vhost_net_enable_vq(n, vq); | 535 | vhost_net_enable_vq(n, vq); |
536 | done: | 536 | done: |
537 | mutex_unlock(&vq->mutex); | ||
538 | |||
537 | if (oldsock) { | 539 | if (oldsock) { |
538 | vhost_net_flush_vq(n, index); | 540 | vhost_net_flush_vq(n, index); |
539 | fput(oldsock->file); | 541 | fput(oldsock->file); |
540 | } | 542 | } |
541 | 543 | ||
544 | mutex_unlock(&n->dev.mutex); | ||
545 | return 0; | ||
546 | |||
542 | err_vq: | 547 | err_vq: |
543 | mutex_unlock(&vq->mutex); | 548 | mutex_unlock(&vq->mutex); |
544 | err: | 549 | err: |