summaryrefslogtreecommitdiff
path: root/rust/kernel/alloc.rs
diff options
context:
space:
mode:
authorDanilo Krummrich <dakr@kernel.org>2024-08-09 01:32:56 +0200
committerDanilo Krummrich <dakr@kernel.org>2024-08-13 16:05:08 +0200
commit340b681e68eea311c77320f9bb81514b4b6a937a (patch)
tree79bb561b8f7ac2ed1b8592a4cafcf3bc6067e2c1 /rust/kernel/alloc.rs
parenta9c0b305ddc1d6415506d26d153386f96f7d3a87 (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. Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Diffstat (limited to 'rust/kernel/alloc.rs')
-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 f0c80ab78602..295107777a12 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.