linux/rust/helpers/slab.c
Alice Ryhl 4890cd1d33 rust: slab: add __rust_helper to helpers
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>
2026-01-26 03:50:50 +01:00

17 lines
522 B
C

// SPDX-License-Identifier: GPL-2.0
#include <linux/slab.h>
__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);
}
__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)
{
return kvrealloc_node_align(p, size, align, flags, node);
}