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:
1ec010e
)
ptr_ring: Remove now-redundant smp_read_barrier_depends()
author
Andrea Parri
<
[email protected]
>
Fri, 16 Feb 2018 11:06:13 +0000
(12:06 +0100)
committer
David S. Miller
<
[email protected]
>
Mon, 19 Feb 2018 16:11:16 +0000
(11:11 -0500)
Because READ_ONCE() now implies smp_read_barrier_depends(), the
smp_read_barrier_depends() in __ptr_ring_consume() is redundant;
this commit removes it and updates the comments.
Signed-off-by: Andrea Parri <
[email protected]
>
Cc: "David S. Miller" <
[email protected]
>
Cc: "Michael S. Tsirkin" <
[email protected]
>
Cc: Jason Wang <
[email protected]
>
Cc: John Fastabend <
[email protected]
>
Cc: Eric Dumazet <
[email protected]
>
Cc: <
[email protected]
>
Cc: <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
include/linux/ptr_ring.h
patch
|
blob
|
history
diff --git
a/include/linux/ptr_ring.h
b/include/linux/ptr_ring.h
index b884b7794187ee4c007b512107c41b7fe5055516..ddfed1dce9369eaee3b18938eb088af9ae2be34f 100644
(file)
--- a/
include/linux/ptr_ring.h
+++ b/
include/linux/ptr_ring.h
@@
-296,13
+296,14
@@
static inline void *__ptr_ring_consume(struct ptr_ring *r)
{
void *ptr;
+ /* The READ_ONCE in __ptr_ring_peek guarantees that anyone
+ * accessing data through the pointer is up to date. Pairs
+ * with smp_wmb in __ptr_ring_produce.
+ */
ptr = __ptr_ring_peek(r);
if (ptr)
__ptr_ring_discard_one(r);
- /* Make sure anyone accessing data through the pointer is up to date. */
- /* Pairs with smp_wmb in __ptr_ring_produce. */
- smp_read_barrier_depends();
return ptr;
}