mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 03:12:22 +00:00
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: Huanle Han <hanxueluo@gmail.com>
This commit is contained in:
parent
c61ded8a7d
commit
a959671da8
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user