diff --git a/src/util/vircgroupv2.c b/src/util/vircgroupv2.c index 0663c671905c6ed93d10fd39b8049748488f8703..00a01586b7ba2cd67e5a9aa579f3c95de4472c29 100644 --- a/src/util/vircgroupv2.c +++ b/src/util/vircgroupv2.c @@ -194,12 +194,16 @@ virCgroupV2DetectMounts(virCgroupPtr group, static int virCgroupV2DetectPlacement(virCgroupPtr group, const char *path, - const char *controllers ATTRIBUTE_UNUSED, + const char *controllers, const char *selfpath) { if (group->unified.placement) return 0; + /* controllers == "" indicates the cgroupv2 controller path */ + if (STRNEQ(controllers, "")) + return 0; + /* * selfpath == "/" + path="" -> "/" * selfpath == "/libvirt.service" + path == "" -> "/libvirt.service"