summaryrefslogtreecommitdiff
path: root/include/linux/seqlock.h
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2016-05-27 01:16:06 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2016-05-27 01:35:44 +0300
commit50755bc1c305340660bbfa65fdae3ed113d8fe0e (patch)
tree683afc1d29d24acfa4d4f821dc1f6c30f2359fa6 /include/linux/seqlock.h
parentea8ea737c46cffa5d0ee74309f81e55a7e5e9c2a (diff)
downloadlinux-50755bc1c305340660bbfa65fdae3ed113d8fe0e.tar.xz
seqlock: fix raw_read_seqcount_latch()
lockless_dereference() is supposed to take pointer not integer. Link: http://lkml.kernel.org/r/20160521201448.GA7429@p183.telecom.by Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/seqlock.h')
-rw-r--r--include/linux/seqlock.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/seqlock.h b/include/linux/seqlock.h
index e0582106ef4f..7973a821ac58 100644
--- a/include/linux/seqlock.h
+++ b/include/linux/seqlock.h
@@ -277,7 +277,7 @@ 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);
+ return lockless_dereference(s)->sequence;
}
/**
@@ -331,7 +331,7 @@ static inline int raw_read_seqcount_latch(seqcount_t *s)
* unsigned seq, idx;
*
* do {
- * seq = lockless_dereference(latch->seq);
+ * seq = lockless_dereference(latch)->seq;
*
* idx = seq & 0x01;
* entry = data_query(latch->data[idx], ...);