mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-12-03 01:10:39 -05:00
ptr_ring: Remove now-redundant smp_read_barrier_depends()
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]>
This commit is contained in:
parent
1ec010e705
commit
e3f9f41757
1 changed files with 4 additions and 3 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue