1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-03-07 17:28:15 +00:00

util: vircgroupv2: use any controller to create thread directory

The assumption that CPU controller would be always enabled is wrong, we
should use any available controller to create a new sub-cgroup.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Pavel Hrdina 2019-06-20 13:07:07 +02:00
parent d3007c844d
commit 535bdf83c0

View File

@ -399,7 +399,7 @@ virCgroupV2MakeGroup(virCgroupPtr parent ATTRIBUTE_UNUSED,
if (create) {
if (flags & VIR_CGROUP_THREAD) {
if (virCgroupSetValueStr(group, VIR_CGROUP_CONTROLLER_CPU,
if (virCgroupSetValueStr(group, controller,
"cgroup.type", "threaded") < 0) {
return -1;
}