提交 bb3de478 编写于 作者: M Michal Privoznik

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: NMichal Privoznik <mprivozn@redhat.com>
Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
上级 eff2b2ed
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册