cgroup: be robust against cgroup movement races, part 2

The previous commit was an incomplete backport of commit 83e4c775,
and as a result made any attempt to start a domain when cgroups
are enabled go into an infinite loop.  This fixes the botched
backport.

Signed-off-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
Eric Blake 2013-05-20 20:30:30 -06:00
parent 39dcf00e72
commit 05bfbdba00

View File

@ -897,6 +897,8 @@ int virCgroupMoveTask(virCgroupPtr src_group, virCgroupPtr dest_group,
rc = virCgroupGetValueStr(src_group, controller, "tasks", &content);
if (rc != 0)
return rc;
if (!*content)
break;
rc = virCgroupAddTaskStrController(dest_group, content, controller);
if (rc != 0)