summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>2017-11-27 09:45:10 -0800
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2017-12-05 11:57:55 -0800
commit3a5db0b108e0a40f08c2bcff6a675dbf632b91e0 (patch)
tree82d42ae442641f772842dad75fffbbe6b7673b5f
parent91db2592e463157d8f4755f56230fb04d0308c4e (diff)
downloadtalos-obmc-linux-3a5db0b108e0a40f08c2bcff6a675dbf632b91e0.tar.gz
talos-obmc-linux-3a5db0b108e0a40f08c2bcff6a675dbf632b91e0.zip
drivers/vhost: Remove now-redundant read_barrier_depends()
Because READ_ONCE() now implies read_barrier_depends(), the read_barrier_depends() in next_desc() is now redundant. This commit therefore removes it and the related comments. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: "Michael S. Tsirkin" <mst@redhat.com> Cc: Jason Wang <jasowang@redhat.com> Cc: <kvm@vger.kernel.org> Cc: <virtualization@lists.linux-foundation.org> Cc: <netdev@vger.kernel.org>
-rw-r--r--drivers/vhost/vhost.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
index 33ac2b186b85..78b5940a415a 100644
--- a/drivers/vhost/vhost.c
+++ b/drivers/vhost/vhost.c
@@ -1877,12 +1877,7 @@ static unsigned next_desc(struct vhost_virtqueue *vq, struct vring_desc *desc)
return -1U;
/* Check they're not leading us off end of descriptors. */
- next = vhost16_to_cpu(vq, desc->next);
- /* Make sure compiler knows to grab that: we don't want it changing! */
- /* We will use the result as an index in an array, so most
- * architectures only need a compiler barrier here. */
- read_barrier_depends();
-
+ next = vhost16_to_cpu(vq, READ_ONCE(desc->next));
return next;
}
OpenPOWER on IntegriCloud