mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 15:27:47 +00:00
qemu: Destroy whole memory tree
When removing path where huge pages are call virFileDeleteTree instead of plain rmdir(). The reason is that in the near future there's going to be more in the path than just files - some subdirs. Therefore plain rmdir() is not going to be enough. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: John Ferlan <jferlan@redhat.com>
This commit is contained in:
parent
eff2b2edb1
commit
bb3de478a6
@ -3348,10 +3348,8 @@ qemuProcessBuildDestroyMemoryPathsImpl(virQEMUDriverPtr driver,
|
||||
return -1;
|
||||
}
|
||||
} else {
|
||||
if (rmdir(path) < 0 &&
|
||||
errno != ENOENT)
|
||||
VIR_WARN("Unable to remove hugepage path: %s (errno=%d)",
|
||||
path, errno);
|
||||
if (virFileDeleteTree(path) < 0)
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user