From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751732AbcEUUOz (ORCPT ); Sat, 21 May 2016 16:14:55 -0400 Received: from mail-lb0-f195.google.com ([209.85.217.195]:36495 "EHLO mail-lb0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751379AbcEUUOx (ORCPT ); Sat, 21 May 2016 16:14:53 -0400 Date: Sat, 21 May 2016 23:14:49 +0300 From: Alexey Dobriyan To: akpm@linux-foundation.org Cc: peterz@infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] seqlock: fix raw_read_seqcount_latch() Message-ID: <20160521201448.GA7429@p183.telecom.by> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org lockless_dereference() is supposed to take pointer not integer. Signed-off-by: Alexey Dobriyan --- include/linux/seqlock.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- 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], ...);