Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

rust: pid_namespace: add __rust_helper to helpers

This is needed to inline these helpers into Rust code.

Signed-off-by: Alice Ryhl <aliceryhl@google.com>
Link: https://patch.msgid.link/20251202-define-rust-helper-v1-27-a2e13cbc17a6@google.com
Reviewed-by: Gary Guo <gary@garyguo.net>
Reviewed-by: Boqun Feng <boqun.feng@gmail.com>
Signed-off-by: Christian Brauner <brauner@kernel.org>

authored by

Alice Ryhl and committed by
Christian Brauner
fc73d4b4 b266a39e

+5 -3
+5 -3
rust/helpers/pid_namespace.c
··· 3 3 #include <linux/pid_namespace.h> 4 4 #include <linux/cleanup.h> 5 5 6 - struct pid_namespace *rust_helper_get_pid_ns(struct pid_namespace *ns) 6 + __rust_helper struct pid_namespace * 7 + rust_helper_get_pid_ns(struct pid_namespace *ns) 7 8 { 8 9 return get_pid_ns(ns); 9 10 } 10 11 11 - void rust_helper_put_pid_ns(struct pid_namespace *ns) 12 + __rust_helper void rust_helper_put_pid_ns(struct pid_namespace *ns) 12 13 { 13 14 put_pid_ns(ns); 14 15 } 15 16 16 17 /* Get a reference on a task's pid namespace. */ 17 - struct pid_namespace *rust_helper_task_get_pid_ns(struct task_struct *task) 18 + __rust_helper struct pid_namespace * 19 + rust_helper_task_get_pid_ns(struct task_struct *task) 18 20 { 19 21 struct pid_namespace *pid_ns; 20 22