aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/virtio/virtio_ring.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/virtio/virtio_ring.c')
-rw-r--r--drivers/virtio/virtio_ring.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c
index a882f2606515..f53600580726 100644
--- a/drivers/virtio/virtio_ring.c
+++ b/drivers/virtio/virtio_ring.c
@@ -208,7 +208,11 @@ add_head:
208 208
209 pr_debug("Added buffer head %i to %p\n", head, vq); 209 pr_debug("Added buffer head %i to %p\n", head, vq);
210 END_USE(vq); 210 END_USE(vq);
211 return 0; 211
212 /* If we're indirect, we can fit many (assuming not OOM). */
213 if (vq->indirect)
214 return vq->num_free ? vq->vring.num : 0;
215 return vq->num_free;
212} 216}
213 217
214static void vring_kick(struct virtqueue *_vq) 218static void vring_kick(struct virtqueue *_vq)