diff options
author | Li Zefan <lizefan@huawei.com> | 2013-06-13 23:18:27 -0400 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2013-06-13 23:48:19 -0400 |
commit | c9e5fe66f5947c9e56dfc7655e5b4b127ca2120f (patch) | |
tree | 48af9bf5e8a7f8ab346ed3bb203a384e1c2095b6 /kernel | |
parent | f047cecf2cfc9595b1f39c9aab383bb0682f5a53 (diff) |
cpuset: rename @cont to @cgrp
Cont is short for container. control group was named process container
at first, but then people found container already has a meaning in
linux kernel.
Clean up the leftover variable name @cont.
Signed-off-by: Li Zefan <lizefan@huawei.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/cpuset.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/kernel/cpuset.c b/kernel/cpuset.c index 4c17d96bd3a5..654c95979028 100644 --- a/kernel/cpuset.c +++ b/kernel/cpuset.c | |||
@@ -116,9 +116,9 @@ struct cpuset { | |||
116 | }; | 116 | }; |
117 | 117 | ||
118 | /* Retrieve the cpuset for a cgroup */ | 118 | /* Retrieve the cpuset for a cgroup */ |
119 | static inline struct cpuset *cgroup_cs(struct cgroup *cont) | 119 | static inline struct cpuset *cgroup_cs(struct cgroup *cgrp) |
120 | { | 120 | { |
121 | return container_of(cgroup_subsys_state(cont, cpuset_subsys_id), | 121 | return container_of(cgroup_subsys_state(cgrp, cpuset_subsys_id), |
122 | struct cpuset, css); | 122 | struct cpuset, css); |
123 | } | 123 | } |
124 | 124 | ||
@@ -433,7 +433,7 @@ static void free_trial_cpuset(struct cpuset *trial) | |||
433 | 433 | ||
434 | static int validate_change(const struct cpuset *cur, const struct cpuset *trial) | 434 | static int validate_change(const struct cpuset *cur, const struct cpuset *trial) |
435 | { | 435 | { |
436 | struct cgroup *cont; | 436 | struct cgroup *cgrp; |
437 | struct cpuset *c, *par; | 437 | struct cpuset *c, *par; |
438 | int ret; | 438 | int ret; |
439 | 439 | ||
@@ -441,7 +441,7 @@ static int validate_change(const struct cpuset *cur, const struct cpuset *trial) | |||
441 | 441 | ||
442 | /* Each of our child cpusets must be a subset of us */ | 442 | /* Each of our child cpusets must be a subset of us */ |
443 | ret = -EBUSY; | 443 | ret = -EBUSY; |
444 | cpuset_for_each_child(c, cont, cur) | 444 | cpuset_for_each_child(c, cgrp, cur) |
445 | if (!is_cpuset_subset(c, trial)) | 445 | if (!is_cpuset_subset(c, trial)) |
446 | goto out; | 446 | goto out; |
447 | 447 | ||
@@ -462,7 +462,7 @@ static int validate_change(const struct cpuset *cur, const struct cpuset *trial) | |||
462 | * overlap | 462 | * overlap |
463 | */ | 463 | */ |
464 | ret = -EINVAL; | 464 | ret = -EINVAL; |
465 | cpuset_for_each_child(c, cont, par) { | 465 | cpuset_for_each_child(c, cgrp, par) { |
466 | if ((is_cpu_exclusive(trial) || is_cpu_exclusive(c)) && | 466 | if ((is_cpu_exclusive(trial) || is_cpu_exclusive(c)) && |
467 | c != cur && | 467 | c != cur && |
468 | cpumask_intersects(trial->cpus_allowed, c->cpus_allowed)) | 468 | cpumask_intersects(trial->cpus_allowed, c->cpus_allowed)) |
@@ -1759,13 +1759,13 @@ static size_t cpuset_sprintf_memlist(char *page, struct cpuset *cs) | |||
1759 | return count; | 1759 | return count; |
1760 | } | 1760 | } |
1761 | 1761 | ||
1762 | static ssize_t cpuset_common_file_read(struct cgroup *cont, | 1762 | static ssize_t cpuset_common_file_read(struct cgroup *cgrp, |
1763 | struct cftype *cft, | 1763 | struct cftype *cft, |
1764 | struct file *file, | 1764 | struct file *file, |
1765 | char __user *buf, | 1765 | char __user *buf, |
1766 | size_t nbytes, loff_t *ppos) | 1766 | size_t nbytes, loff_t *ppos) |
1767 | { | 1767 | { |
1768 | struct cpuset *cs = cgroup_cs(cont); | 1768 | struct cpuset *cs = cgroup_cs(cgrp); |
1769 | cpuset_filetype_t type = cft->private; | 1769 | cpuset_filetype_t type = cft->private; |
1770 | char *page; | 1770 | char *page; |
1771 | ssize_t retval = 0; | 1771 | ssize_t retval = 0; |
@@ -1795,9 +1795,9 @@ out: | |||
1795 | return retval; | 1795 | return retval; |
1796 | } | 1796 | } |
1797 | 1797 | ||
1798 | static u64 cpuset_read_u64(struct cgroup *cont, struct cftype *cft) | 1798 | static u64 cpuset_read_u64(struct cgroup *cgrp, struct cftype *cft) |
1799 | { | 1799 | { |
1800 | struct cpuset *cs = cgroup_cs(cont); | 1800 | struct cpuset *cs = cgroup_cs(cgrp); |
1801 | cpuset_filetype_t type = cft->private; | 1801 | cpuset_filetype_t type = cft->private; |
1802 | switch (type) { | 1802 | switch (type) { |
1803 | case FILE_CPU_EXCLUSIVE: | 1803 | case FILE_CPU_EXCLUSIVE: |
@@ -1826,9 +1826,9 @@ static u64 cpuset_read_u64(struct cgroup *cont, struct cftype *cft) | |||
1826 | return 0; | 1826 | return 0; |
1827 | } | 1827 | } |
1828 | 1828 | ||
1829 | static s64 cpuset_read_s64(struct cgroup *cont, struct cftype *cft) | 1829 | static s64 cpuset_read_s64(struct cgroup *cgrp, struct cftype *cft) |
1830 | { | 1830 | { |
1831 | struct cpuset *cs = cgroup_cs(cont); | 1831 | struct cpuset *cs = cgroup_cs(cgrp); |
1832 | cpuset_filetype_t type = cft->private; | 1832 | cpuset_filetype_t type = cft->private; |
1833 | switch (type) { | 1833 | switch (type) { |
1834 | case FILE_SCHED_RELAX_DOMAIN_LEVEL: | 1834 | case FILE_SCHED_RELAX_DOMAIN_LEVEL: |
@@ -1940,14 +1940,14 @@ static struct cftype files[] = { | |||
1940 | 1940 | ||
1941 | /* | 1941 | /* |
1942 | * cpuset_css_alloc - allocate a cpuset css | 1942 | * cpuset_css_alloc - allocate a cpuset css |
1943 | * cont: control group that the new cpuset will be part of | 1943 | * cgrp: control group that the new cpuset will be part of |
1944 | */ | 1944 | */ |
1945 | 1945 | ||
1946 | static struct cgroup_subsys_state *cpuset_css_alloc(struct cgroup *cont) | 1946 | static struct cgroup_subsys_state *cpuset_css_alloc(struct cgroup *cgrp) |
1947 | { | 1947 | { |
1948 | struct cpuset *cs; | 1948 | struct cpuset *cs; |
1949 | 1949 | ||
1950 | if (!cont->parent) | 1950 | if (!cgrp->parent) |
1951 | return &top_cpuset.css; | 1951 | return &top_cpuset.css; |
1952 | 1952 | ||
1953 | cs = kzalloc(sizeof(*cs), GFP_KERNEL); | 1953 | cs = kzalloc(sizeof(*cs), GFP_KERNEL); |
@@ -2042,9 +2042,9 @@ static void cpuset_css_offline(struct cgroup *cgrp) | |||
2042 | * will call rebuild_sched_domains_locked(). | 2042 | * will call rebuild_sched_domains_locked(). |
2043 | */ | 2043 | */ |
2044 | 2044 | ||
2045 | static void cpuset_css_free(struct cgroup *cont) | 2045 | static void cpuset_css_free(struct cgroup *cgrp) |
2046 | { | 2046 | { |
2047 | struct cpuset *cs = cgroup_cs(cont); | 2047 | struct cpuset *cs = cgroup_cs(cgrp); |
2048 | 2048 | ||
2049 | free_cpumask_var(cs->cpus_allowed); | 2049 | free_cpumask_var(cs->cpus_allowed); |
2050 | kfree(cs); | 2050 | kfree(cs); |