cgroups/cgfsng: rework cgfsng_nrtasks()

parent 362bcc43
...@@ -1933,8 +1933,11 @@ __cgfsng_ops static int cgfsng_nrtasks(struct cgroup_ops *ops) ...@@ -1933,8 +1933,11 @@ __cgfsng_ops static int cgfsng_nrtasks(struct cgroup_ops *ops)
{ {
__do_free char *path = NULL; __do_free char *path = NULL;
if (!ops)
return ret_set_errno(-1, ENOENT);
if (!ops->container_cgroup || !ops->hierarchies) if (!ops->container_cgroup || !ops->hierarchies)
return -1; return ret_set_errno(-1, EINVAL);
path = must_make_path(ops->hierarchies[0]->container_full_path, NULL); path = must_make_path(ops->hierarchies[0]->container_full_path, NULL);
return recursive_count_nrtasks(path); return recursive_count_nrtasks(path);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment