projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
91db259
)
drivers/vhost: Remove now-redundant read_barrier_depends()
author
Paul E. McKenney
<
[email protected]
>
Mon, 27 Nov 2017 17:45:10 +0000
(09:45 -0800)
committer
Paul E. McKenney
<
[email protected]
>
Tue, 5 Dec 2017 19:57:55 +0000
(11:57 -0800)
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 <
[email protected]
>
Cc: "Michael S. Tsirkin" <
[email protected]
>
Cc: Jason Wang <
[email protected]
>
Cc: <
[email protected]
>
Cc: <
[email protected]
>
Cc: <
[email protected]
>
drivers/vhost/vhost.c
patch
|
blob
|
history
diff --git
a/drivers/vhost/vhost.c
b/drivers/vhost/vhost.c
index 33ac2b186b85eb1f4883d26d6d0d9b3a8532fc01..78b5940a415a83bb6b3cc83be59f8ebf263ccb78 100644
(file)
--- 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;
}