FROMGIT: rust: alloc: add Vec::insert_within_capacity
This adds a variant of Vec::insert that does not allocate memory. This makes it safe to use this function while holding a spinlock. Rust Binder uses it for the range allocator fast path. Signed-off-by:Alice Ryhl <aliceryhl@google.com> Reviewed-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org> Reviewed-by:
Benno Lossin <lossin@kernel.org> Link: https://lore.kernel.org/r/20250502-vec-methods-v5-7-06d20ad9366f@google.com Signed-off-by:
Danilo Krummrich <dakr@kernel.org> Bug: 414994413 (cherry picked from commit 771c5a7d https://github.com/Rust-for-Linux/linux.git alloc-next) Change-Id: I5661d5ee9ff239a92c4a640e334ad6d60196ad25 Signed-off-by:
Alice Ryhl <aliceryhl@google.com>
Loading
Please sign in to comment