Merge branch 'maybe-fix-delete' into main

This commit is contained in:
bunnie 2023-01-19 23:53:49 +08:00
commit fb648b4e21

View file

@ -571,14 +571,15 @@ impl BasisCache {
} else { } else {
// this implementation is still in progress // this implementation is still in progress
dict_entry.key_erase(key); dict_entry.key_erase(key);
// encrypt and write the dict entry to disk
basis.dict_sync(hw, dict)?;
// sync the root basis structure as well, while we're at it...
basis.basis_sync(hw);
// finally, sync the page tables.
basis.pt_sync(hw);
} }
// sync the key pools to disk
dict_entry.sync_large_pool();
// encrypt and write the dict entry to disk
basis.dict_sync(hw, dict)?;
// sync the root basis structure as well, while we're at it...
basis.basis_sync(hw);
// finally, sync the page tables.
basis.pt_sync(hw);
return Ok(()) return Ok(())
} else { } else {
return Err(Error::new(ErrorKind::NotFound, "key not found")); return Err(Error::new(ErrorKind::NotFound, "key not found"));