From: Alexey Dobriyan Date: Thu, 26 May 2016 22:16:06 +0000 (-0700) Subject: seqlock: fix raw_read_seqcount_latch() X-Git-Tag: v4.9.8~1994^2~9 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=50755bc1c305340660bbfa65fdae3ed113d8fe0e;p=platform%2Fkernel%2Flinux-rpi3.git 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 Cc: Peter Zijlstra Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/include/linux/seqlock.h b/include/linux/seqlock.h index e058210..7973a82 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], ...);