You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
cgroup: remove cgroup_subsys argument from callbacks
The argument is not used at all, and it's not necessary, because a specific callback handler of course knows which subsys it belongs to. Now only ->pupulate() takes this argument, because the handlers of this callback always call cgroup_add_file()/cgroup_add_files(). So we reduce a few lines of code, though the shrinking of object size is minimal. 16 files changed, 113 insertions(+), 162 deletions(-) text data bss dec hex filename 5486240 656987 7039960 13183187 c928d3 vmlinux.o.orig 5486170 656987 7039960 13183117 c9288d vmlinux.o Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> Signed-off-by: Tejun Heo <tj@kernel.org>
This commit is contained in:
@@ -128,8 +128,7 @@ struct cgroup_subsys freezer_subsys;
|
||||
* task->alloc_lock (inside __thaw_task(), prevents race with refrigerator())
|
||||
* sighand->siglock
|
||||
*/
|
||||
static struct cgroup_subsys_state *freezer_create(struct cgroup_subsys *ss,
|
||||
struct cgroup *cgroup)
|
||||
static struct cgroup_subsys_state *freezer_create(struct cgroup *cgroup)
|
||||
{
|
||||
struct freezer *freezer;
|
||||
|
||||
@@ -142,8 +141,7 @@ static struct cgroup_subsys_state *freezer_create(struct cgroup_subsys *ss,
|
||||
return &freezer->css;
|
||||
}
|
||||
|
||||
static void freezer_destroy(struct cgroup_subsys *ss,
|
||||
struct cgroup *cgroup)
|
||||
static void freezer_destroy(struct cgroup *cgroup)
|
||||
{
|
||||
struct freezer *freezer = cgroup_freezer(cgroup);
|
||||
|
||||
@@ -164,8 +162,7 @@ static bool is_task_frozen_enough(struct task_struct *task)
|
||||
* a write to that file racing against an attach, and hence the
|
||||
* can_attach() result will remain valid until the attach completes.
|
||||
*/
|
||||
static int freezer_can_attach(struct cgroup_subsys *ss,
|
||||
struct cgroup *new_cgroup,
|
||||
static int freezer_can_attach(struct cgroup *new_cgroup,
|
||||
struct cgroup_taskset *tset)
|
||||
{
|
||||
struct freezer *freezer;
|
||||
@@ -185,7 +182,7 @@ static int freezer_can_attach(struct cgroup_subsys *ss,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void freezer_fork(struct cgroup_subsys *ss, struct task_struct *task)
|
||||
static void freezer_fork(struct task_struct *task)
|
||||
{
|
||||
struct freezer *freezer;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user