summaryrefslogtreecommitdiffstats
path: root/drivers/vhost/net.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/vhost/net.c')
-rw-r--r--drivers/vhost/net.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c
index 54096eef4840..2406377a6e5e 100644
--- a/drivers/vhost/net.c
+++ b/drivers/vhost/net.c
@@ -137,7 +137,7 @@ static void handle_tx(struct vhost_net *net)
&out, &in,
NULL, NULL);
/* On error, stop handling until the next kick. */
- if (head < 0)
+ if (unlikely(head < 0))
break;
/* Nothing new? Wait for eventfd to tell us they refilled. */
if (head == vq->num) {
@@ -234,7 +234,7 @@ static void handle_rx(struct vhost_net *net)
&out, &in,
vq_log, &log);
/* On error, stop handling until the next kick. */
- if (head < 0)
+ if (unlikely(head < 0))
break;
/* OK, now we need to know about added descriptors. */
if (head == vq->num) {