diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2017-02-16 19:51:27 +0100 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2017-02-16 19:51:27 +0100 |
commit | 5b1ad68f9b1951ef78312d2935906cc8a8bd2e12 (patch) | |
tree | e81b71c961e885cef0d3992e083acec845166870 /drivers/vhost/vhost.c | |
parent | 1013fe32a63d1139b1b32049ea46c0c462738d8b (diff) | |
parent | 7089db84e356562f8ba737c29e472cc42d530dbc (diff) | |
download | linux-5b1ad68f9b1951ef78312d2935906cc8a8bd2e12.tar.bz2 |
Merge branch 'linus' into x86/mm
Make sure to get the latest fixes before applying the ptdump enhancements.
Diffstat (limited to 'drivers/vhost/vhost.c')
-rw-r--r-- | drivers/vhost/vhost.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index d6432603880c..8f99fe08de02 100644 --- a/drivers/vhost/vhost.c +++ b/drivers/vhost/vhost.c @@ -130,14 +130,14 @@ static long vhost_get_vring_endian(struct vhost_virtqueue *vq, u32 idx, static void vhost_init_is_le(struct vhost_virtqueue *vq) { - if (vhost_has_feature(vq, VIRTIO_F_VERSION_1)) - vq->is_le = true; + vq->is_le = vhost_has_feature(vq, VIRTIO_F_VERSION_1) + || virtio_legacy_is_little_endian(); } #endif /* CONFIG_VHOST_CROSS_ENDIAN_LEGACY */ static void vhost_reset_is_le(struct vhost_virtqueue *vq) { - vq->is_le = virtio_legacy_is_little_endian(); + vhost_init_is_le(vq); } struct vhost_flush_struct { @@ -1714,10 +1714,8 @@ int vhost_vq_init_access(struct vhost_virtqueue *vq) int r; bool is_le = vq->is_le; - if (!vq->private_data) { - vhost_reset_is_le(vq); + if (!vq->private_data) return 0; - } vhost_init_is_le(vq); |