aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/cpuset.c
diff options
context:
space:
mode:
authorLi Zefan <lizf@cn.fujitsu.com>2012-01-31 00:47:36 -0500
committerTejun Heo <tj@kernel.org>2012-02-02 12:20:22 -0500
commit761b3ef50e1c2649cffbfa67a4dcb2dcdb7982ed (patch)
tree67ab6a9a2520811c9c0b4d70d1c19b4bfca16237 /kernel/cpuset.c
parent61d1d219c4c0761059236a46867bc49943c4d29d (diff)
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>
Diffstat (limited to 'kernel/cpuset.c')
-rw-r--r--kernel/cpuset.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/kernel/cpuset.c b/kernel/cpuset.c
index a09ac2b9a661..5d575836dba6 100644
--- a/kernel/cpuset.c
+++ b/kernel/cpuset.c
@@ -1399,8 +1399,7 @@ static nodemask_t cpuset_attach_nodemask_from;
1399static nodemask_t cpuset_attach_nodemask_to; 1399static nodemask_t cpuset_attach_nodemask_to;
1400 1400
1401/* Called by cgroups to determine if a cpuset is usable; cgroup_mutex held */ 1401/* Called by cgroups to determine if a cpuset is usable; cgroup_mutex held */
1402static int cpuset_can_attach(struct cgroup_subsys *ss, struct cgroup *cgrp, 1402static int cpuset_can_attach(struct cgroup *cgrp, struct cgroup_taskset *tset)
1403 struct cgroup_taskset *tset)
1404{ 1403{
1405 struct cpuset *cs = cgroup_cs(cgrp); 1404 struct cpuset *cs = cgroup_cs(cgrp);
1406 struct task_struct *task; 1405 struct task_struct *task;
@@ -1436,8 +1435,7 @@ static int cpuset_can_attach(struct cgroup_subsys *ss, struct cgroup *cgrp,
1436 return 0; 1435 return 0;
1437} 1436}
1438 1437
1439static void cpuset_attach(struct cgroup_subsys *ss, struct cgroup *cgrp, 1438static void cpuset_attach(struct cgroup *cgrp, struct cgroup_taskset *tset)
1440 struct cgroup_taskset *tset)
1441{ 1439{
1442 struct mm_struct *mm; 1440 struct mm_struct *mm;
1443 struct task_struct *task; 1441 struct task_struct *task;
@@ -1833,8 +1831,7 @@ static int cpuset_populate(struct cgroup_subsys *ss, struct cgroup *cont)
1833 * (and likewise for mems) to the new cgroup. Called with cgroup_mutex 1831 * (and likewise for mems) to the new cgroup. Called with cgroup_mutex
1834 * held. 1832 * held.
1835 */ 1833 */
1836static void cpuset_post_clone(struct cgroup_subsys *ss, 1834static void cpuset_post_clone(struct cgroup *cgroup)
1837 struct cgroup *cgroup)
1838{ 1835{
1839 struct cgroup *parent, *child; 1836 struct cgroup *parent, *child;
1840 struct cpuset *cs, *parent_cs; 1837 struct cpuset *cs, *parent_cs;
@@ -1857,13 +1854,10 @@ static void cpuset_post_clone(struct cgroup_subsys *ss,
1857 1854
1858/* 1855/*
1859 * cpuset_create - create a cpuset 1856 * cpuset_create - create a cpuset
1860 * ss: cpuset cgroup subsystem
1861 * cont: control group that the new cpuset will be part of 1857 * cont: control group that the new cpuset will be part of
1862 */ 1858 */
1863 1859
1864static struct cgroup_subsys_state *cpuset_create( 1860static struct cgroup_subsys_state *cpuset_create(struct cgroup *cont)
1865 struct cgroup_subsys *ss,
1866 struct cgroup *cont)
1867{ 1861{
1868 struct cpuset *cs; 1862 struct cpuset *cs;
1869 struct cpuset *parent; 1863 struct cpuset *parent;
@@ -1902,7 +1896,7 @@ static struct cgroup_subsys_state *cpuset_create(
1902 * will call async_rebuild_sched_domains(). 1896 * will call async_rebuild_sched_domains().
1903 */ 1897 */
1904 1898
1905static void cpuset_destroy(struct cgroup_subsys *ss, struct cgroup *cont) 1899static void cpuset_destroy(struct cgroup *cont)
1906{ 1900{
1907 struct cpuset *cs = cgroup_cs(cont); 1901 struct cpuset *cs = cgroup_cs(cont);
1908 1902