diff options
author | David S. Miller <davem@davemloft.net> | 2010-07-20 21:25:24 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-07-20 21:25:24 -0400 |
commit | 11fe883936980fe242869d671092a466cf1db3e3 (patch) | |
tree | 14ff24e81eb4326e94eb5aa6432a1dd55cef5ece /drivers/vhost | |
parent | 70d4bf6d467a330ccc947df9b2608e329d9e7708 (diff) | |
parent | 573201f36fd9c7c6d5218cdcd9948cee700b277d (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/vhost/net.c
net/bridge/br_device.c
Fix merge conflict in drivers/vhost/net.c with guidance from
Stephen Rothwell.
Revert the effects of net-2.6 commit 573201f36fd9c7c6d5218cdcd9948cee700b277d
since net-next-2.6 has fixes that make bridge netpoll work properly thus
we don't need it disabled.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/vhost')
-rw-r--r-- | drivers/vhost/net.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index 107af9e61dc1..7a104e2de3fa 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 | } |
@@ -527,17 +527,23 @@ static long vhost_net_set_backend(struct vhost_net *n, unsigned index, int fd) | |||
527 | 527 | ||
528 | /* start polling new socket */ | 528 | /* start polling new socket */ |
529 | oldsock = vq->private_data; | 529 | oldsock = vq->private_data; |
530 | if (sock != oldsock){ | 530 | if (sock != oldsock) { |
531 | vhost_net_disable_vq(n, vq); | 531 | vhost_net_disable_vq(n, vq); |
532 | rcu_assign_pointer(vq->private_data, sock); | 532 | rcu_assign_pointer(vq->private_data, sock); |
533 | vhost_net_enable_vq(n, vq); | 533 | vhost_net_enable_vq(n, vq); |
534 | } | 534 | } |
535 | 535 | ||
536 | done: | ||
537 | mutex_unlock(&vq->mutex); | ||
538 | |||
536 | if (oldsock) { | 539 | if (oldsock) { |
537 | vhost_net_flush_vq(n, index); | 540 | vhost_net_flush_vq(n, index); |
538 | fput(oldsock->file); | 541 | fput(oldsock->file); |
539 | } | 542 | } |
540 | 543 | ||
544 | mutex_unlock(&n->dev.mutex); | ||
545 | return 0; | ||
546 | |||
541 | err_vq: | 547 | err_vq: |
542 | mutex_unlock(&vq->mutex); | 548 | mutex_unlock(&vq->mutex); |
543 | err: | 549 | err: |