diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-10-06 15:02:30 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-10-06 15:02:34 +0200 |
commit | d9b2002c406011164f245de7a81304625989f1c9 (patch) | |
tree | a2bb74773cd1409acbec5eb2fbba2ae9889d55e8 /drivers/virtio/virtio_ring.c | |
parent | c3b32fcbc7f4fd9a9b84718b991b175b0fd53f8c (diff) | |
parent | 906010b2134e14a2e377decbadd357b3d0ab9c6a (diff) |
Merge branch 'perf/urgent' into perf/core
Merge reason: Upcoming patch is dependent on a fix in perf/urgent.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'drivers/virtio/virtio_ring.c')
-rw-r--r-- | drivers/virtio/virtio_ring.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c index a882f260651..f5360058072 100644 --- a/drivers/virtio/virtio_ring.c +++ b/drivers/virtio/virtio_ring.c @@ -208,7 +208,11 @@ add_head: pr_debug("Added buffer head %i to %p\n", head, vq); END_USE(vq); - return 0; + + /* If we're indirect, we can fit many (assuming not OOM). */ + if (vq->indirect) + return vq->num_free ? vq->vring.num : 0; + return vq->num_free; } static void vring_kick(struct virtqueue *_vq) |