forked from mirrors/linux
		
	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>
This commit is contained in:
		
							parent
							
								
									ea8ea737c4
								
							
						
					
					
						commit
						50755bc1c3
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
					@ -277,7 +277,7 @@ static inline void raw_write_seqcount_barrier(seqcount_t *s)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static inline int raw_read_seqcount_latch(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;
 | 
					 *	unsigned seq, idx;
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *	do {
 | 
					 *	do {
 | 
				
			||||||
 *		seq = lockless_dereference(latch->seq);
 | 
					 *		seq = lockless_dereference(latch)->seq;
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *		idx = seq & 0x01;
 | 
					 *		idx = seq & 0x01;
 | 
				
			||||||
 *		entry = data_query(latch->data[idx], ...);
 | 
					 *		entry = data_query(latch->data[idx], ...);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue