Skip to content
Snippets Groups Projects
Verified Commit dcf40072 authored by Jeremy Soller's avatar Jeremy Soller
Browse files

Ensure that dealloc of allocator log blocks are queued, not immediate

parent 9a8437f4
No related branches found
No related tags found
No related merge requests found
......@@ -127,7 +127,7 @@ impl<'a, D: Disk> Transaction<'a, D> {
let mut alloc_ptr = self.header.alloc;
while !alloc_ptr.is_null() {
let alloc = self.read_block(alloc_ptr)?;
self.deallocate_block(alloc_ptr);
self.deallocate.push(alloc.addr());
alloc_ptr = alloc.data().prev;
}
} else {
......@@ -147,9 +147,7 @@ impl<'a, D: Disk> Transaction<'a, D> {
}
// Prepare to deallocate old alloc block
unsafe {
self.deallocate(alloc.addr());
}
self.deallocate.push(alloc.addr());
// Link to previous alloc block
prev_ptr = alloc.data().prev;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment