aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/vhost/net.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/vhost/net.c')
-rw-r--r--drivers/vhost/net.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c
index 91a324cc2298..ad37da2b6cb5 100644
--- a/drivers/vhost/net.c
+++ b/drivers/vhost/net.c
@@ -114,8 +114,12 @@ static void handle_tx(struct vhost_net *net)
114 return; 114 return;
115 115
116 wmem = atomic_read(&sock->sk->sk_wmem_alloc); 116 wmem = atomic_read(&sock->sk->sk_wmem_alloc);
117 if (wmem >= sock->sk->sk_sndbuf) 117 if (wmem >= sock->sk->sk_sndbuf) {
118 mutex_lock(&vq->mutex);
119 tx_poll_start(net, sock);
120 mutex_unlock(&vq->mutex);
118 return; 121 return;
122 }
119 123
120 use_mm(net->dev.mm); 124 use_mm(net->dev.mm);
121 mutex_lock(&vq->mutex); 125 mutex_lock(&vq->mutex);