vhost: max s/g to match qemu
[firefly-linux-kernel-4.4.55.git] / drivers / vhost / net.c
index 29e850a7a2f9871b7c9658e0717f8926dc5bc4ac..72ab71fdf05339e311c14d4004f122ed0ef3828e 100644 (file)
@@ -243,7 +243,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 >= UIO_MAXIOV)) {
                        r = -ENOBUFS;
                        goto err;
                }