Re: [PATCH v2 16/27] rust: rcu: add __rust_helper to helpers

From: Joel Fernandes
Date: Mon Jan 05 2026 - 10:28:20 EST




On 1/5/2026 7:42 AM, Alice Ryhl wrote:
> This is needed to inline these helpers into Rust code.
>
> Reviewed-by: Boqun Feng <boqun.feng@xxxxxxxxx>
> Reviewed-by: Gary Guo <gary@xxxxxxxxxxx>
> Signed-off-by: Alice Ryhl <aliceryhl@xxxxxxxxxx>

Reviewed-by: Joel Fernandes (NVIDIA) <joel@xxxxxxxxxxxxxxxxx>

Thanks.




> ---
> Cc: "Paul E. McKenney" <paulmck@xxxxxxxxxx>
> Cc: Boqun Feng <boqun.feng@xxxxxxxxx>
> Cc: rcu@xxxxxxxxxxxxxxx
> ---
> rust/helpers/rcu.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/rust/helpers/rcu.c b/rust/helpers/rcu.c
> index f1cec6583513497e996f74835ca2c6c3f4a8c954..481274c058577276e20093a1014fc49f4a40421b 100644
> --- a/rust/helpers/rcu.c
> +++ b/rust/helpers/rcu.c
> @@ -2,12 +2,12 @@
>
> #include <linux/rcupdate.h>
>
> -void rust_helper_rcu_read_lock(void)
> +__rust_helper void rust_helper_rcu_read_lock(void)
> {
> rcu_read_lock();
> }
>
> -void rust_helper_rcu_read_unlock(void)
> +__rust_helper void rust_helper_rcu_read_unlock(void)
> {
> rcu_read_unlock();
> }
>