vhost: rename vhost_init_used()

Looking at how callers use this, maybe we should just rename init_used
to vhost_vq_init_access. The _used suffix was a hint that we
access the vq used ring. But maybe what callers care about is
that it must be called after access_ok.

Also, this function manipulates the vq->is_le field which isn't related
to the vq used ring.

This patch simply renames vhost_init_used() to vhost_vq_init_access() as
suggested by Michael.

No behaviour change.

Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Cette révision appartient à :
Greg Kurz
2016-02-16 15:59:44 +01:00
révisé par Michael S. Tsirkin
Parent c507203756
révision 80f7d0301e
5 fichiers modifiés avec 6 ajouts et 6 suppressions

Voir le fichier

@@ -1170,7 +1170,7 @@ static int vhost_update_avail_event(struct vhost_virtqueue *vq, u16 avail_event)
return 0;
}
int vhost_init_used(struct vhost_virtqueue *vq)
int vhost_vq_init_access(struct vhost_virtqueue *vq)
{
__virtio16 last_used_idx;
int r;
@@ -1200,7 +1200,7 @@ err:
vq->is_le = is_le;
return r;
}
EXPORT_SYMBOL_GPL(vhost_init_used);
EXPORT_SYMBOL_GPL(vhost_vq_init_access);
static int translate_desc(struct vhost_virtqueue *vq, u64 addr, u32 len,
struct iovec iov[], int iov_size)