Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

cgroup: Remove unused cgroup_subsys::post_attach

cgroup_subsys::post_attach callback was introduced in commit 5cf1cacb49ae
("cgroup, cpuset: replace cpuset_post_attach_flush() with
cgroup_subsys->post_attach callback") and only cpuset would use this
callback to wait for the mm migration to complete at the end of
__cgroup_procs_write(). Since the previous patch defer the flush operation
until returning to userspace, no one use this callback now. Remove this
callback from cgroup_subsys.

Signed-off-by: Chuyi Zhou <zhouchuyi@bytedance.com>
Acked-by: Waiman Long <longman@redhat.com>
Signed-off-by: Tejun Heo <tj@kernel.org>

authored by

Chuyi Zhou and committed by
Tejun Heo
d8b269e0 3514309e

-5
-1
include/linux/cgroup-defs.h
··· 763 763 int (*can_attach)(struct cgroup_taskset *tset); 764 764 void (*cancel_attach)(struct cgroup_taskset *tset); 765 765 void (*attach)(struct cgroup_taskset *tset); 766 - void (*post_attach)(void); 767 766 int (*can_fork)(struct task_struct *task, 768 767 struct css_set *cset); 769 768 void (*cancel_fork)(struct task_struct *task, struct css_set *cset);
-4
kernel/cgroup/cgroup.c
··· 3033 3033 put_task_struct(task); 3034 3034 3035 3035 cgroup_attach_unlock(threadgroup_locked); 3036 - 3037 - for_each_subsys(ss, ssid) 3038 - if (ss->post_attach) 3039 - ss->post_attach(); 3040 3036 } 3041 3037 3042 3038 static void cgroup_print_ss_mask(struct seq_file *seq, u16 ss_mask)