lkml.org 
[lkml]   [2023]   [Jun]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v2 1/2] seqlock: Do the lockdep annotation before locking in do_write_seqcount_begin_nested()
From
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_);
}

\
 
 \ /
  Last update: 2023-06-24 08:55    [W:0.134 / U:0.716 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site