diff options
Diffstat (limited to 'kernel/cgroup.c')
-rw-r--r-- | kernel/cgroup.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/kernel/cgroup.c b/kernel/cgroup.c index 671dc05c0b0f..909a7d31ffd3 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c | |||
@@ -2825,9 +2825,10 @@ static ssize_t __cgroup_procs_write(struct kernfs_open_file *of, char *buf, | |||
2825 | size_t nbytes, loff_t off, bool threadgroup) | 2825 | size_t nbytes, loff_t off, bool threadgroup) |
2826 | { | 2826 | { |
2827 | struct task_struct *tsk; | 2827 | struct task_struct *tsk; |
2828 | struct cgroup_subsys *ss; | ||
2828 | struct cgroup *cgrp; | 2829 | struct cgroup *cgrp; |
2829 | pid_t pid; | 2830 | pid_t pid; |
2830 | int ret; | 2831 | int ssid, ret; |
2831 | 2832 | ||
2832 | if (kstrtoint(strstrip(buf), 0, &pid) || pid < 0) | 2833 | if (kstrtoint(strstrip(buf), 0, &pid) || pid < 0) |
2833 | return -EINVAL; | 2834 | return -EINVAL; |
@@ -2875,8 +2876,10 @@ out_unlock_rcu: | |||
2875 | rcu_read_unlock(); | 2876 | rcu_read_unlock(); |
2876 | out_unlock_threadgroup: | 2877 | out_unlock_threadgroup: |
2877 | percpu_up_write(&cgroup_threadgroup_rwsem); | 2878 | percpu_up_write(&cgroup_threadgroup_rwsem); |
2879 | for_each_subsys(ss, ssid) | ||
2880 | if (ss->post_attach) | ||
2881 | ss->post_attach(); | ||
2878 | cgroup_kn_unlock(of->kn); | 2882 | cgroup_kn_unlock(of->kn); |
2879 | cpuset_post_attach_flush(); | ||
2880 | return ret ?: nbytes; | 2883 | return ret ?: nbytes; |
2881 | } | 2884 | } |
2882 | 2885 | ||