]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
cgroup: Remove unused cgroup_subsys::post_attach
authorChuyi Zhou <zhouchuyi@bytedance.com>
Thu, 4 Sep 2025 07:45:05 +0000 (15:45 +0800)
committerTejun Heo <tj@kernel.org>
Thu, 4 Sep 2025 17:25:20 +0000 (07:25 -1000)
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>
include/linux/cgroup-defs.h
kernel/cgroup/cgroup.c

index 539c64eeef38f3f94d3dc81fc872ed43fc6ef4fe..92ed6d18266d138f9c130495d4db4a0b796a5510 100644 (file)
@@ -763,7 +763,6 @@ struct cgroup_subsys {
        int (*can_attach)(struct cgroup_taskset *tset);
        void (*cancel_attach)(struct cgroup_taskset *tset);
        void (*attach)(struct cgroup_taskset *tset);
-       void (*post_attach)(void);
        int (*can_fork)(struct task_struct *task,
                        struct css_set *cset);
        void (*cancel_fork)(struct task_struct *task, struct css_set *cset);
index b38d7a847ed4a5b6693d5a3046eefe868d0e161e..0dc6ad71f175b8fe5c459fcc2a8ecb5371445fbd 100644 (file)
@@ -3033,10 +3033,6 @@ void cgroup_procs_write_finish(struct task_struct *task, bool threadgroup_locked
        put_task_struct(task);
 
        cgroup_attach_unlock(threadgroup_locked);
-
-       for_each_subsys(ss, ssid)
-               if (ss->post_attach)
-                       ss->post_attach();
 }
 
 static void cgroup_print_ss_mask(struct seq_file *seq, u16 ss_mask)