]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
rust: slab: add __rust_helper to helpers
authorAlice Ryhl <aliceryhl@google.com>
Mon, 5 Jan 2026 12:42:32 +0000 (12:42 +0000)
committerMiguel Ojeda <ojeda@kernel.org>
Mon, 26 Jan 2026 02:50:50 +0000 (03:50 +0100)
This is needed to inline these helpers into Rust code.

Reviewed-by: Boqun Feng <boqun.feng@gmail.com>
Reviewed-by: Gary Guo <gary@garyguo.net>
Signed-off-by: Alice Ryhl <aliceryhl@google.com>
Acked-by: Danilo Krummrich <dakr@kernel.org>
Link: https://patch.msgid.link/20260105-define-rust-helper-v2-19-51da5f454a67@google.com
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
rust/helpers/slab.c

index 7fac958907b0a7cbb28ef3a8a56e0cc10d39288f..9279f082467d896381e34c4333492a92d626da2e 100644 (file)
@@ -2,14 +2,14 @@
 
 #include <linux/slab.h>
 
-void * __must_check __realloc_size(2)
+__rust_helper void *__must_check __realloc_size(2)
 rust_helper_krealloc_node_align(const void *objp, size_t new_size, unsigned long align,
                                gfp_t flags, int node)
 {
        return krealloc_node_align(objp, new_size, align, flags, node);
 }
 
-void * __must_check __realloc_size(2)
+__rust_helper void *__must_check __realloc_size(2)
 rust_helper_kvrealloc_node_align(const void *p, size_t size, unsigned long align,
                                 gfp_t flags, int node)
 {