]> xenbits.xensource.com Git - libvirt.git/commitdiff
vircgroup: one central point for adding tasks to cgroups
authorHenning Schild <henning.schild@siemens.com>
Fri, 26 Feb 2016 15:34:22 +0000 (16:34 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Tue, 1 Mar 2016 11:20:56 +0000 (11:20 +0000)
Use virCgroupAddTaskController in virCgroupAddTask so we have one
single point where we add tasks to cgroups.

Signed-off-by: Henning Schild <henning.schild@siemens.com>
src/util/vircgroup.c

index 38398fd7d58465cf06713eaf84e67a1ac0c9edc5..706d27cec3bde5ee89be2be0f7af13403f20f084 100644 (file)
@@ -1183,7 +1183,7 @@ virCgroupAddTask(virCgroupPtr group, pid_t pid)
         if (i == VIR_CGROUP_CONTROLLER_SYSTEMD)
             continue;
 
-        if (virCgroupSetValueU64(group, i, "tasks", pid) < 0)
+        if (virCgroupAddTaskController(group, pid, i) < 0)
             goto cleanup;
     }