aboutsummaryrefslogtreecommitdiff
path: root/rust/kernel
diff options
context:
space:
mode:
authorDanilo Krummrich <[email protected]>2024-10-04 17:41:14 +0200
committerMiguel Ojeda <[email protected]>2024-10-15 22:56:59 +0200
commit01b2196e5aac8af9343282d0044fa0d6b07d484c (patch)
treeb5f585e744de5446ab5e81437d202f126fb9365b /rust/kernel
parent8362c2608ba1be635ffa22a256dfcfe51c6238cc (diff)
rust: alloc: add __GFP_NOWARN to `Flags`
Some test cases in subsequent patches provoke allocation failures. Add `__GFP_NOWARN` to enable test cases to silence unpleasant warnings. Reviewed-by: Alice Ryhl <[email protected]> Reviewed-by: Benno Lossin <[email protected]> Reviewed-by: Gary Guo <[email protected]> Signed-off-by: Danilo Krummrich <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Miguel Ojeda <[email protected]>
Diffstat (limited to 'rust/kernel')
-rw-r--r--rust/kernel/alloc.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/rust/kernel/alloc.rs b/rust/kernel/alloc.rs
index b5605aab182d..8172106a1423 100644
--- a/rust/kernel/alloc.rs
+++ b/rust/kernel/alloc.rs
@@ -91,6 +91,11 @@ pub mod flags {
/// use any filesystem callback. It is very likely to fail to allocate memory, even for very
/// small allocations.
pub const GFP_NOWAIT: Flags = Flags(bindings::GFP_NOWAIT);
+
+ /// Suppresses allocation failure reports.
+ ///
+ /// This is normally or'd with other flags.
+ pub const __GFP_NOWARN: Flags = Flags(bindings::__GFP_NOWARN);
}
/// The kernel's [`Allocator`] trait.