|
10 | 10 | #include <linux/eventfd.h> |
11 | 11 | #include <linux/vhost.h> |
12 | 12 | #include <linux/virtio_net.h> |
13 | | -#include <linux/mmu_context.h> |
14 | 13 | #include <linux/miscdevice.h> |
15 | 14 | #include <linux/module.h> |
16 | 15 | #include <linux/mutex.h> |
@@ -142,7 +141,6 @@ static void handle_tx(struct vhost_net *net) |
142 | 141 | return; |
143 | 142 | } |
144 | 143 |
|
145 | | - use_mm(net->dev.mm); |
146 | 144 | mutex_lock(&vq->mutex); |
147 | 145 | vhost_disable_notify(vq); |
148 | 146 |
|
@@ -207,7 +205,6 @@ static void handle_tx(struct vhost_net *net) |
207 | 205 | } |
208 | 206 |
|
209 | 207 | mutex_unlock(&vq->mutex); |
210 | | - unuse_mm(net->dev.mm); |
211 | 208 | } |
212 | 209 |
|
213 | 210 | static int peek_head_len(struct sock *sk) |
@@ -312,7 +309,6 @@ static void handle_rx_big(struct vhost_net *net) |
312 | 309 | if (!sock || skb_queue_empty(&sock->sk->sk_receive_queue)) |
313 | 310 | return; |
314 | 311 |
|
315 | | - use_mm(net->dev.mm); |
316 | 312 | mutex_lock(&vq->mutex); |
317 | 313 | vhost_disable_notify(vq); |
318 | 314 | hdr_size = vq->vhost_hlen; |
@@ -391,7 +387,6 @@ static void handle_rx_big(struct vhost_net *net) |
391 | 387 | } |
392 | 388 |
|
393 | 389 | mutex_unlock(&vq->mutex); |
394 | | - unuse_mm(net->dev.mm); |
395 | 390 | } |
396 | 391 |
|
397 | 392 | /* Expects to be always run from workqueue - which acts as |
@@ -423,7 +418,6 @@ static void handle_rx_mergeable(struct vhost_net *net) |
423 | 418 | if (!sock || skb_queue_empty(&sock->sk->sk_receive_queue)) |
424 | 419 | return; |
425 | 420 |
|
426 | | - use_mm(net->dev.mm); |
427 | 421 | mutex_lock(&vq->mutex); |
428 | 422 | vhost_disable_notify(vq); |
429 | 423 | vhost_hlen = vq->vhost_hlen; |
@@ -500,7 +494,6 @@ static void handle_rx_mergeable(struct vhost_net *net) |
500 | 494 | } |
501 | 495 |
|
502 | 496 | mutex_unlock(&vq->mutex); |
503 | | - unuse_mm(net->dev.mm); |
504 | 497 | } |
505 | 498 |
|
506 | 499 | static void handle_rx(struct vhost_net *net) |
|
0 commit comments