mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-10-30 01:43:23 +00:00
bridge_driver: Don't check network active unlocked
Okay, this is mainly for educational purposes since is called from single point only with all the possible locks held. So there's no way for other thread to hop in and do something wrong. Nevertheless, we should not give bad example. Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
bf1afdd491
commit
7b8c12d8ce
@ -353,10 +353,11 @@ networkUpdateAllState(void)
|
||||
for (i = 0; i < driver->networks.count; i++) {
|
||||
virNetworkObjPtr obj = driver->networks.objs[i];
|
||||
|
||||
if (!obj->active)
|
||||
continue;
|
||||
|
||||
virNetworkObjLock(obj);
|
||||
if (!virNetworkObjIsActive(obj)) {
|
||||
virNetworkObjUnlock(obj);
|
||||
continue;
|
||||
}
|
||||
|
||||
switch (obj->def->forward.type) {
|
||||
case VIR_NETWORK_FORWARD_NONE:
|
||||
|
Loading…
Reference in New Issue
Block a user