diff options
author | Danilo Krummrich <dakr@kernel.org> | 2025-03-07 23:49:36 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-03-13 13:01:44 +0100 |
commit | 10027707e1cafe3761b3268bef090a7d4f968013 (patch) | |
tree | c6929fbef559d653fb4e8fcbca2536b391901900 /rust/kernel/alloc.rs | |
parent | b1ae22456ab52f06635ecdff5102f8a41a7e0a01 (diff) |
rust: alloc: add __GFP_NOWARN to `Flags`
commit 01b2196e5aac8af9343282d0044fa0d6b07d484c upstream.
Some test cases in subsequent patches provoke allocation failures. Add
`__GFP_NOWARN` to enable test cases to silence unpleasant warnings.
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Reviewed-by: Benno Lossin <benno.lossin@proton.me>
Reviewed-by: Gary Guo <gary@garyguo.net>
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Link: https://lore.kernel.org/r/20241004154149.93856-11-dakr@kernel.org
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'rust/kernel/alloc.rs')
-rw-r--r-- | rust/kernel/alloc.rs | 5 |
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. |