diff options
| author | Kees Cook <keescook@chromium.org> | 2016-07-25 13:50:36 -0700 |
|---|---|---|
| committer | Kees Cook <keescook@chromium.org> | 2016-07-25 13:50:36 -0700 |
| commit | 74e630a7582e6b3cb39559d712a0049f08dea8a0 (patch) | |
| tree | 98a752412dcfc74d802024c1d9e8c541b93174f9 /include/linux/seqlock.h | |
| parent | 35da60941e44dbf57868e67686dd24cc1a33125a (diff) | |
| parent | 523d939ef98fd712632d93a5a2b588e477a7565e (diff) | |
Merge tag 'v4.7' into for-linus/pstore
Linux 4.7
Diffstat (limited to 'include/linux/seqlock.h')
| -rw-r--r-- | include/linux/seqlock.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/linux/seqlock.h b/include/linux/seqlock.h index 7973a821ac58..ead97654c4e9 100644 --- a/include/linux/seqlock.h +++ b/include/linux/seqlock.h @@ -277,7 +277,10 @@ static inline void raw_write_seqcount_barrier(seqcount_t *s) static inline int raw_read_seqcount_latch(seqcount_t *s) { - return lockless_dereference(s)->sequence; + int seq = READ_ONCE(s->sequence); + /* Pairs with the first smp_wmb() in raw_write_seqcount_latch() */ + smp_read_barrier_depends(); + return seq; } /** @@ -331,7 +334,7 @@ static inline int raw_read_seqcount_latch(seqcount_t *s) * unsigned seq, idx; * * do { - * seq = lockless_dereference(latch)->seq; + * seq = raw_read_seqcount_latch(&latch->seq); * * idx = seq & 0x01; * entry = data_query(latch->data[idx], ...); |
