[libvirt PATCH 16/25] vircgroup: virCgroupNew is now always called with absolute path

Pavel Hrdina phrdina at redhat.com
Tue Nov 3 12:41:28 UTC 2020


Signed-off-by: Pavel Hrdina <phrdina at redhat.com>
---
 src/util/vircgroup.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c
index 56aa9cc064..794680d696 100644
--- a/src/util/vircgroup.c
+++ b/src/util/vircgroup.c
@@ -457,10 +457,8 @@ virCgroupDetect(virCgroupPtr group,
     if (virCgroupDetectMounts(group) < 0)
         return -1;
 
-    if (path[0] == '/') {
-        if (virCgroupCopyPlacement(group, path, NULL) < 0)
-            return -1;
-    }
+    if (virCgroupCopyPlacement(group, path, NULL) < 0)
+        return -1;
 
     /* ... but use /proc/cgroups to fill in the rest */
     if (virCgroupDetectPlacement(group, pid, path) < 0)
@@ -703,10 +701,6 @@ virCgroupMakeGroup(virCgroupPtr parent,
  *
  * Create a new cgroup storing it in @group.
  *
- * If @path starts with a '/' it is treated as an
- * absolute path. Otherwise then the placement of the current
- * process is used.
- *
  * Returns 0 on success, -1 on error
  */
 int
-- 
2.26.2




More information about the libvir-list mailing list