From 95dc2fabe30f3e4e92d58c3ac45856fc76071081 Mon Sep 17 00:00:00 2001 From: Pavel Hrdina Date: Thu, 15 Oct 2020 12:36:40 +0200 Subject: [PATCH] vircgroup: virCgroupNew is now always called with absolute path Signed-off-by: Pavel Hrdina Reviewed-by: Michal Privoznik --- 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