提交 d1c7b00b 编写于 作者: D Daniel P. Berrange

Release VM lock before acquiring virDomainObjListPtr lock

When removing a VM from the virDomainObjListPtr, we must not
be holding the VM lock while acquiring the list lock. Re-order
code to ensure that we can release the VM lock early.
上级 61b52d2e
......@@ -2116,11 +2116,10 @@ void virDomainObjListRemove(virDomainObjListPtr doms,
{
char uuidstr[VIR_UUID_STRING_BUFLEN];
virObjectLock(doms);
virUUIDFormat(dom->def->uuid, uuidstr);
virObjectUnlock(dom);
virObjectLock(doms);
virHashRemoveEntry(doms->objs, uuidstr);
virObjectUnlock(doms);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册