aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2016-05-26 18:16:06 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2016-05-26 18:35:44 -0400
commit50755bc1c305340660bbfa65fdae3ed113d8fe0e (patch)
tree683afc1d29d24acfa4d4f821dc1f6c30f2359fa6
parentea8ea737c46cffa5d0ee74309f81e55a7e5e9c2a (diff)
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>
-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)
277 277
278static inline int raw_read_seqcount_latch(seqcount_t *s) 278static inline int raw_read_seqcount_latch(seqcount_t *s)
279{ 279{
280 return lockless_dereference(s->sequence); 280 return lockless_dereference(s)->sequence;
281} 281}
282 282
283/** 283/**
@@ -331,7 +331,7 @@ static inline int raw_read_seqcount_latch(seqcount_t *s)
331 * unsigned seq, idx; 331 * unsigned seq, idx;
332 * 332 *
333 * do { 333 * do {
334 * seq = lockless_dereference(latch->seq); 334 * seq = lockless_dereference(latch)->seq;
335 * 335 *
336 * idx = seq & 0x01; 336 * idx = seq & 0x01;
337 * entry = data_query(latch->data[idx], ...); 337 * entry = data_query(latch->data[idx], ...);