提交 a959671d 编写于 作者: H Huanle Han 提交者: Martin Kletzander

hostdev: fix loop index error when resetvfnetconfig

The variable 'last_processed_hostdev_vf' indicates index of the last
successfully configed vf. When resetvfnetconfig because of failure,
hostdevs[last_processed_hostdev_vf] should also be reset.
Signed-off-by: NHuanle Han <hanxueluo@gmail.com>
上级 c61ded8a
......@@ -693,7 +693,7 @@ virHostdevPreparePCIDevices(virHostdevManagerPtr hostdev_mgr,
resetvfnetconfig:
for (i = 0;
last_processed_hostdev_vf != -1 && i < last_processed_hostdev_vf; i++)
last_processed_hostdev_vf != -1 && i <= last_processed_hostdev_vf; i++)
virHostdevNetConfigRestore(hostdevs[i], hostdev_mgr->stateDir, NULL);
reattachdevs:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册