diff options
author | Heinz Graalfs <graalfs@linux.vnet.ibm.com> | 2013-10-28 19:10:19 -0400 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2013-10-28 20:58:17 -0400 |
commit | b3b32c94133621c9ba7e4c8f29ec7533f2f4d8ec (patch) | |
tree | d24065656240c707ec76d6932e2f00554dc52713 /drivers/virtio/virtio_ring.c | |
parent | 53c18c990644174935ca93e50d7ebd05e04cb9ee (diff) |
virtio_ring: add new function virtqueue_is_broken()
Add new function virtqueue_is_broken(). Callers of virtqueue_get_buf()
should check for a broken queue.
Signed-off-by: Heinz Graalfs <graalfs@linux.vnet.ibm.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'drivers/virtio/virtio_ring.c')
-rw-r--r-- | drivers/virtio/virtio_ring.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c index b47142723119..f47777582ce5 100644 --- a/drivers/virtio/virtio_ring.c +++ b/drivers/virtio/virtio_ring.c | |||
@@ -851,4 +851,12 @@ unsigned int virtqueue_get_vring_size(struct virtqueue *_vq) | |||
851 | } | 851 | } |
852 | EXPORT_SYMBOL_GPL(virtqueue_get_vring_size); | 852 | EXPORT_SYMBOL_GPL(virtqueue_get_vring_size); |
853 | 853 | ||
854 | bool virtqueue_is_broken(struct virtqueue *_vq) | ||
855 | { | ||
856 | struct vring_virtqueue *vq = to_vvq(_vq); | ||
857 | |||
858 | return vq->broken; | ||
859 | } | ||
860 | EXPORT_SYMBOL_GPL(virtqueue_is_broken); | ||
861 | |||
854 | MODULE_LICENSE("GPL"); | 862 | MODULE_LICENSE("GPL"); |