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.

Merge tag 'vfs-7.0-rc1.rust' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs

Pull vfs rust updates from Christian Brauner:
"Allow inlining C helpers into Rust when using LTO: Add the
__rust_helper annotation to all VFS-related Rust helper functions.

Currently, C helpers cannot be inlined into Rust code even under LTO
because LLVM detects slightly different codegen options between the C
and Rust compilation units (differing null-pointer-check flags,
builtin lists, and target feature strings). The __rust_helper macro is
the first step toward fixing this: it is currently #defined to
nothing, but a follow-up series will change it to __always_inline when
compiling with LTO (while keeping it empty for bindgen, which ignores
inline functions).

This picks up the VFS portion (fs, pid_namespace, poll) of a larger
tree-wide series"

* tag 'vfs-7.0-rc1.rust' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs:
rust: poll: add __rust_helper to helpers
rust: pid_namespace: add __rust_helper to helpers
rust: fs: add __rust_helper to helpers

+9 -6
+1 -1
rust/helpers/fs.c
··· 6 6 7 7 #include <linux/fs.h> 8 8 9 - struct file *rust_helper_get_file(struct file *f) 9 + __rust_helper struct file *rust_helper_get_file(struct file *f) 10 10 { 11 11 return get_file(f); 12 12 }
+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
+3 -2
rust/helpers/poll.c
··· 3 3 #include <linux/export.h> 4 4 #include <linux/poll.h> 5 5 6 - void rust_helper_poll_wait(struct file *filp, wait_queue_head_t *wait_address, 7 - poll_table *p) 6 + __rust_helper void rust_helper_poll_wait(struct file *filp, 7 + wait_queue_head_t *wait_address, 8 + poll_table *p) 8 9 { 9 10 poll_wait(filp, wait_address, p); 10 11 }