vmm: remove lock for VmState

The lock doesn't make any sense. There is no shared ownership. All
accesses are already synchronized by accesses on a higher level.

Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de>
On-behalf-of: SAP philipp.schuster@sap.com
This commit is contained in:
Philipp Schuster
2026-02-12 19:03:07 +01:00
committed by Rob Bradford
parent 9babad0114
commit 03ef7d1991
2 changed files with 22 additions and 44 deletions
+2 -2
View File
@@ -1875,7 +1875,7 @@ impl RequestHandler for Vmm {
match &self.vm_config {
Some(vm_config) => {
let state = match &self.vm {
Some(vm) => vm.get_state()?,
Some(vm) => vm.get_state(),
None => VmState::Created,
};
let config = vm_config.lock().unwrap().clone();
@@ -2347,7 +2347,7 @@ impl RequestHandler for Vmm {
return e;
}
if vm.get_state().unwrap() == VmState::Paused
if vm.get_state() == VmState::Paused
&& let Err(e) = vm.resume()
{
return e;