]> git.baikalelectronics.ru Git - kernel.git/commit
seqlock,lockdep: Fix seqcount_latch_init()
authorPeter Zijlstra <peterz@infradead.org>
Tue, 9 Mar 2021 14:21:18 +0000 (15:21 +0100)
committerPeter Zijlstra <peterz@infradead.org>
Wed, 10 Mar 2021 08:51:45 +0000 (09:51 +0100)
commit834192c65e94a09a9a59efbfe92b091fa1580919
tree7b9bcc533db887192bee4e559dc4f4ed6a6a668d
parent9e5ed2fc85795268073c64e4191e665aa1dfa9a9
seqlock,lockdep: Fix seqcount_latch_init()

seqcount_init() must be a macro in order to preserve the static
variable that is used for the lockdep key. Don't then wrap it in an
inline function, which destroys that.

Luckily there aren't many users of this function, but fix it before it
becomes a problem.

Fixes: 270565974fb5 ("seqlock: Introduce seqcount_latch_t")
Reported-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/YEeFEbNUVkZaXDp4@hirez.programming.kicks-ass.net
include/linux/seqlock.h