Re: [PATCH v2 1/2] seqlock: Do the lockdep annotation before locking in do_write_seqcount_begin_nested()
From: Tetsuo Handa
Date: Sat Jun 24 2023 - 02:54:19 EST
On 2023/06/24 2:12, Sebastian Andrzej Siewior wrote:
> include/linux/seqlock.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/linux/seqlock.h b/include/linux/seqlock.h
> index 3926e90279477..d778af83c8f36 100644
> --- a/include/linux/seqlock.h
> +++ b/include/linux/seqlock.h
> @@ -512,8 +512,8 @@ do { \
>
> static inline void do_write_seqcount_begin_nested(seqcount_t *s, int subclass)
> {
> - do_raw_write_seqcount_begin(s);
> seqcount_acquire(&s->dep_map, subclass, 0, _RET_IP_);
> + do_raw_write_seqcount_begin(s);
> }
>
> /**
Why not to do the same on the end side?
static inline void do_write_seqcount_end(seqcount_t *s)
{
- seqcount_release(&s->dep_map, _RET_IP_);
do_raw_write_seqcount_end(s);
+ seqcount_release(&s->dep_map, _RET_IP_);
}