mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 10:58:48 +09:00
cgroup: fix error return value from cgroup_subtree_control()
commit3c74541777upstream. While refactoring,f7b2814bb9("cgroup: factor out cgroup_{apply|finalize}_control() from cgroup_subtree_control_write()") broke error return value from the function. The return value from the last operation is always overridden to zero. Fix it. Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
4a99eac8d2
commit
445ee6cdd9
@@ -3487,11 +3487,11 @@ static ssize_t cgroup_subtree_control_write(struct kernfs_open_file *of,
|
||||
cgrp->subtree_control &= ~disable;
|
||||
|
||||
ret = cgroup_apply_control(cgrp);
|
||||
|
||||
cgroup_finalize_control(cgrp, ret);
|
||||
if (ret)
|
||||
goto out_unlock;
|
||||
|
||||
kernfs_activate(cgrp->kn);
|
||||
ret = 0;
|
||||
out_unlock:
|
||||
cgroup_kn_unlock(of->kn);
|
||||
return ret ?: nbytes;
|
||||
|
||||
Reference in New Issue
Block a user