mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-04 21:21:36 +00:00
cgroups: simplify cgfsng_nrtasks()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
This commit is contained in:
parent
779b3d82e6
commit
3312a94ff4
@ -1898,14 +1898,12 @@ static int recursive_count_nrtasks(char *dirname)
|
||||
__cgfsng_ops static int cgfsng_nrtasks(struct cgroup_ops *ops)
|
||||
{
|
||||
__do_free char *path = NULL;
|
||||
int count;
|
||||
|
||||
if (!ops->container_cgroup || !ops->hierarchies)
|
||||
return -1;
|
||||
|
||||
path = must_make_path(ops->hierarchies[0]->container_full_path, NULL);
|
||||
count = recursive_count_nrtasks(path);
|
||||
return count;
|
||||
return recursive_count_nrtasks(path);
|
||||
}
|
||||
|
||||
/* Only root needs to escape to the cgroup of its init. */
|
||||
|
Loading…
Reference in New Issue
Block a user