seqlock,lockdep: Fix seqcount_latch_init()
authorPeter Zijlstra <peterz@infradead.org>
Tue, 9 Mar 2021 14:21:18 +0000 (15:21 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Mar 2021 16:06:34 +0000 (17:06 +0100)
commit2a39eb7b86704ca2f9573adcb0029d6b9a84bf55
tree72dad06685b127ac48254d2c654941d32e21ff7e
parent372734dc18977e61cb96e86b771389fa9fafa1c8
seqlock,lockdep: Fix seqcount_latch_init()

[ Upstream commit 4817a52b306136c8b2b2271d8770401441e4cf79 ]

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: 80793c3471d9 ("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
Signed-off-by: Sasha Levin <sashal@kernel.org>
include/linux/seqlock.h