提交 e926df60 编写于 作者: A Andrea Bolognani

hostdev: Only rollback detach of managed devices on error

Since we don't detach unmanaged devices before attaching them to a
domain, we shouldn't reattach them to rollback an error either.
上级 b8a625f3
......@@ -711,6 +711,7 @@ virHostdevPreparePCIDevices(virHostdevManagerPtr hostdev_mgr,
for (i = 0; i < virPCIDeviceListCount(pcidevs); i++) {
virPCIDevicePtr dev = virPCIDeviceListGet(pcidevs, i);
if (virPCIDeviceGetManaged(dev)) {
/* NB: This doesn't actually re-bind to original driver, just
* unbinds from the stub driver
*/
......@@ -718,6 +719,7 @@ virHostdevPreparePCIDevices(virHostdevManagerPtr hostdev_mgr,
hostdev_mgr->activePCIHostdevs,
hostdev_mgr->inactivePCIHostdevs));
}
}
cleanup:
virObjectUnlock(hostdev_mgr->activePCIHostdevs);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册