diff options
| author | Maarten Lankhorst <maarten.lankhorst@linux.intel.com> | 2018-05-11 18:08:10 +0200 |
|---|---|---|
| committer | Maarten Lankhorst <maarten.lankhorst@linux.intel.com> | 2018-05-11 18:08:10 +0200 |
| commit | 94cc2fde365fb4484080ea6675bb1e0c933f8002 (patch) | |
| tree | a249c6f6b12ff2dbe39d78bfb050e9c28619bee9 /include/linux/ptr_ring.h | |
| parent | 900aa8ad21587e909603f471b6cd81fd5338ec45 (diff) | |
| parent | 8eb008c80841e3410ef2c043093478ea36bb5ff1 (diff) | |
Merge remote-tracking branch 'drm/drm-next' into drm-misc-next
drm-misc-next is still based on v4.16-rc7, and was getting a bit stale.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Diffstat (limited to 'include/linux/ptr_ring.h')
| -rw-r--r-- | include/linux/ptr_ring.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/include/linux/ptr_ring.h b/include/linux/ptr_ring.h index e6335227b844..6894976b54e3 100644 --- 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; } |
