cgroup: return EINVAL in cgroup_subtree_control_write()
PATCH 1/1 cgroup: return EINVAL in cgroup_subtree_control_write()
If add into the cgroup.subtree_control file with a subsystem name which is beyond the scope of the ones in the parent's cgroup.subtree_control file, the response is ’no such file or directory', which is confusing since the cgroup.subtree_control file is present, return EINVAL in this case.
Signed-off-by Li Wang <[email protected]>
--- kernel/cgroup/cgroup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/cgroup/cgroup.c +1 -1
@@ -3391,7 +3391,7 @@ static ssize_t cgroup_subtree_control_write(struct kernfs_open_file *of, }if (!(cgroup_control (cgrp) & (1 << ssid))) { - ret = -ENOENT ; + ret = -EINVAL ; goto out_unlock; } }else if (disable & (1 << ssid)) {
Signature · 1 line
2.34.1