mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
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:
committed by
Rob Bradford
parent
9babad0114
commit
03ef7d1991
+2
-2
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user