]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - drivers/vhost/net.c
Merge commit 'v2.6.36-rc7' into core/rcu
[net-next-2.6.git] / drivers / vhost / net.c
index 1318ee00834646182038063a8237afdb7d4e5d5c..17927b1f9334ead1e854ed539dea352f8718c589 100644 (file)
@@ -246,7 +246,7 @@ static int get_rx_bufs(struct vhost_virtqueue *vq,
        int r, nlogs = 0;
 
        while (datalen > 0) {
-               if (unlikely(headcount >= VHOST_NET_MAX_SG)) {
+               if (unlikely(seg >= VHOST_NET_MAX_SG)) {
                        r = -ENOBUFS;
                        goto err;
                }