diff options
| -rw-r--r-- | drivers/virtio/virtio_ring.c | 2 | ||||
| -rw-r--r-- | include/linux/virtio_ring.h | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c index 18846afb39da..5df92c308286 100644 --- a/drivers/virtio/virtio_ring.c +++ b/drivers/virtio/virtio_ring.c | |||
| @@ -882,6 +882,8 @@ static struct virtqueue *vring_create_virtqueue_split( | |||
| 882 | GFP_KERNEL|__GFP_NOWARN|__GFP_ZERO); | 882 | GFP_KERNEL|__GFP_NOWARN|__GFP_ZERO); |
| 883 | if (queue) | 883 | if (queue) |
| 884 | break; | 884 | break; |
| 885 | if (!may_reduce_num) | ||
| 886 | return NULL; | ||
| 885 | } | 887 | } |
| 886 | 888 | ||
| 887 | if (!num) | 889 | if (!num) |
diff --git a/include/linux/virtio_ring.h b/include/linux/virtio_ring.h index fab02133a919..3dc70adfe5f5 100644 --- a/include/linux/virtio_ring.h +++ b/include/linux/virtio_ring.h | |||
| @@ -63,7 +63,7 @@ struct virtqueue; | |||
| 63 | /* | 63 | /* |
| 64 | * Creates a virtqueue and allocates the descriptor ring. If | 64 | * Creates a virtqueue and allocates the descriptor ring. If |
| 65 | * may_reduce_num is set, then this may allocate a smaller ring than | 65 | * may_reduce_num is set, then this may allocate a smaller ring than |
| 66 | * expected. The caller should query virtqueue_get_ring_size to learn | 66 | * expected. The caller should query virtqueue_get_vring_size to learn |
| 67 | * the actual size of the ring. | 67 | * the actual size of the ring. |
| 68 | */ | 68 | */ |
| 69 | struct virtqueue *vring_create_virtqueue(unsigned int index, | 69 | struct virtqueue *vring_create_virtqueue(unsigned int index, |
