提交 7b8c12d8 编写于 作者: M Michal Privoznik

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: NMichal Privoznik <mprivozn@redhat.com>
上级 bf1afdd4
......@@ -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:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册