Skip to content

Commit 1716aed

Browse files
committed
fixup! drm/asahi: alloc: Do not allocate memory to free memory
Signed-off-by: Janne Grunau <j@jannau.net>
1 parent 2979000 commit 1716aed

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

drivers/gpu/drm/asahi/alloc.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -771,7 +771,7 @@ impl HeapAllocator {
771771
garbage: if keep_garbage {
772772
Some({
773773
let mut v = Vec::new();
774-
v.try_reserve(128)?;
774+
v.reserve(128, GFP_KERNEL)?;
775775
v
776776
})
777777
} else {
@@ -1058,8 +1058,8 @@ impl Allocator for HeapAllocator {
10581058
for node in g.drain(0..block) {
10591059
inner.total_garbage -= node.size() as usize;
10601060
garbage
1061-
.try_push(node)
1062-
.expect("try_push() failed after reserve()");
1061+
.push(node, GFP_KERNEL)
1062+
.expect("push() failed after reserve()");
10631063
}
10641064
}
10651065
});

0 commit comments

Comments
 (0)