mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 05:31:08 -04:00
seqlock: fix raw_read_seqcount_latch()
lockless_dereference() is supposed to take pointer not integer. Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Alexey Dobriyan <[email protected]> Cc: Peter Zijlstra <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
1 parent
ea8ea737c4
commit
50755bc1c3
1 file changed
+2
-2
@@ -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], ...);
|
||||
|
||||
Reference in new issue
Block a user