diff options
| author | Amit Pundir <amit.pundir@linaro.org> | 2015-12-21 16:01:10 +0530 |
|---|---|---|
| committer | John Stultz <john.stultz@linaro.org> | 2016-02-16 13:53:46 -0800 |
| commit | 703920c14a3caa66862bd12b88a7ed6460ebef6b (patch) | |
| tree | 5a34a327d91a0ba0f6158c34d63c575ef4566b5b /kernel | |
| parent | 69db8fca423ad74f6a16f7d499b5a1006335e4df (diff) | |
cgroup: refactor allow_attach handler for 4.4
Refactor *allow_attach() handler to align it with the changes
from mainline commit 1f7dd3e5a6e4 "cgroup: fix handling of
multi-destination migration from subtree_control enabling".
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/cgroup.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/kernel/cgroup.c b/kernel/cgroup.c index 7fd423e55046..a57b7c86871c 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c @@ -2663,15 +2663,16 @@ static int cgroup_attach_task(struct cgroup *dst_cgrp, return ret; } -int subsys_cgroup_allow_attach(struct cgroup_subsys_state *css, struct cgroup_taskset *tset) +int subsys_cgroup_allow_attach(struct cgroup_taskset *tset) { const struct cred *cred = current_cred(), *tcred; struct task_struct *task; + struct cgroup_subsys_state *css; if (capable(CAP_SYS_NICE)) return 0; - cgroup_taskset_for_each(task, tset) { + cgroup_taskset_for_each(task, css, tset) { tcred = __task_cred(task); if (current != task && !uid_eq(cred->euid, tcred->uid) && @@ -2690,7 +2691,7 @@ static int cgroup_allow_attach(struct cgroup *cgrp, struct cgroup_taskset *tset) for_each_css(css, i, cgrp) { if (css->ss->allow_attach) { - ret = css->ss->allow_attach(css, tset); + ret = css->ss->allow_attach(tset); if (ret) return ret; } else { |
