We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8c8c011 commit a5e634eCopy full SHA for a5e634e
1 file changed
rust/kernel/dma_fence.rs
@@ -5,6 +5,7 @@
5
//! C header: [`include/linux/dma_fence.h`](../../include/linux/dma_fence.h)
6
7
use crate::{
8
+ alloc::{flags::*, vec_ext::VecExt},
9
bindings,
10
error::{to_result, Result},
11
prelude::*,
@@ -445,10 +446,10 @@ impl FenceContexts {
445
446
pub fn new(count: u32, name: &'static CStr, key: LockClassKey) -> Result<FenceContexts> {
447
let mut seqnos: Vec<AtomicU64> = Vec::new();
448
- seqnos.try_reserve(count as usize)?;
449
+ seqnos.reserve(count as usize, GFP_KERNEL)?;
450
451
for _ in 0..count {
- seqnos.try_push(Default::default())?;
452
+ seqnos.push(Default::default(), GFP_KERNEL)?;
453
}
454
455
// SAFETY: This is always safe to call
0 commit comments