On Mon, Jul 06, 2026 at 10:27:41AM -0700, Puranjay Mohan wrote:
> Add a guard(srcu_fast_updown) definition for scoped
> SRCU-fast-updown read-side critical sections, following the
> existing pattern of guard(srcu) and guard(srcu_fast).
> 
> Signed-off-by: Puranjay Mohan <[email protected]>

Reviewed-by: Paul E. McKenney <[email protected]>

(Or I can take it if you would prefer, but it might be easier and faster
for you to send it along with the next patch.)

> ---
>  include/linux/srcu.h | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/include/linux/srcu.h b/include/linux/srcu.h
> index a54ce9e808b92..72c86d3b23f2e 100644
> --- a/include/linux/srcu.h
> +++ b/include/linux/srcu.h
> @@ -638,4 +638,11 @@ DEFINE_LOCK_GUARD_1(srcu_fast_notrace, struct 
> srcu_struct,
>  DECLARE_LOCK_GUARD_1_ATTRS(srcu_fast_notrace, __acquires_shared(_T), 
> __releases_shared(*(struct srcu_struct **)_T))
>  #define class_srcu_fast_notrace_constructor(_T) 
> WITH_LOCK_GUARD_1_ATTRS(srcu_fast_notrace, _T)
>  
> +DEFINE_LOCK_GUARD_1(srcu_fast_updown, struct srcu_struct,
> +                 _T->scp = srcu_read_lock_fast_updown(_T->lock),
> +                 srcu_read_unlock_fast_updown(_T->lock, _T->scp),
> +                 struct srcu_ctr __percpu *scp)
> +DECLARE_LOCK_GUARD_1_ATTRS(srcu_fast_updown, __acquires_shared(_T), 
> __releases_shared(*(struct srcu_struct **)_T))
> +#define class_srcu_fast_updown_constructor(_T) 
> WITH_LOCK_GUARD_1_ATTRS(srcu_fast_updown, _T)
> +
>  #endif
> -- 
> 2.53.0-Meta
> 

Reply via email to