diff options
author | Reed Riley <reed@riley.engineer> | 2024-04-15 21:08:13 -0700 |
---|---|---|
committer | Reed Riley <reed@riley.engineer> | 2024-04-15 21:08:13 -0700 |
commit | e5e8f203d77f90d1af8ebfd794eb1593582b85cc (patch) | |
tree | 4b247a45e411ea62d5af495eec775d3d48c40676 /rust/helpers.c | |
parent | 6432d7745c1d0eba610fed85a8a6bac1864e858d (diff) | |
parent | 72cfb036b00a2c9f59a5d6ff1bc2d039ffb67490 (diff) |
Merge branch 'memalloc_prof_v6' of https://github.com/surenbaghdasaryan/linux
Diffstat (limited to 'rust/helpers.c')
-rw-r--r-- | rust/helpers.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/rust/helpers.c b/rust/helpers.c index 70e59efd92bc..858d802abd11 100644 --- a/rust/helpers.c +++ b/rust/helpers.c @@ -28,6 +28,7 @@ #include <linux/mutex.h> #include <linux/refcount.h> #include <linux/sched/signal.h> +#include <linux/slab.h> #include <linux/spinlock.h> #include <linux/wait.h> #include <linux/workqueue.h> @@ -157,6 +158,13 @@ void rust_helper_init_work_with_key(struct work_struct *work, work_func_t func, } EXPORT_SYMBOL_GPL(rust_helper_init_work_with_key); +void * __must_check __realloc_size(2) +rust_helper_krealloc(const void *objp, size_t new_size, gfp_t flags) +{ + return krealloc(objp, new_size, flags); +} +EXPORT_SYMBOL_GPL(rust_helper_krealloc); + /* * `bindgen` binds the C `size_t` type as the Rust `usize` type, so we can * use it in contexts where Rust expects a `usize` like slice (array) indices. |