Skip to content

Commit

Permalink
cpuset: rename @cont to @cgrp
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Li Zefan authored and Tejun Heo committed Jun 14, 2013
1 parent f047cec commit c9e5fe6
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions kernel/cpuset.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,9 @@ struct cpuset {
};

/* Retrieve the cpuset for a cgroup */
static inline struct cpuset *cgroup_cs(struct cgroup *cont)
static inline struct cpuset *cgroup_cs(struct cgroup *cgrp)
{
return container_of(cgroup_subsys_state(cont, cpuset_subsys_id),
return container_of(cgroup_subsys_state(cgrp, cpuset_subsys_id),
struct cpuset, css);
}

Expand Down Expand Up @@ -433,15 +433,15 @@ static void free_trial_cpuset(struct cpuset *trial)

static int validate_change(const struct cpuset *cur, const struct cpuset *trial)
{
struct cgroup *cont;
struct cgroup *cgrp;
struct cpuset *c, *par;
int ret;

rcu_read_lock();

/* Each of our child cpusets must be a subset of us */
ret = -EBUSY;
cpuset_for_each_child(c, cont, cur)
cpuset_for_each_child(c, cgrp, cur)
if (!is_cpuset_subset(c, trial))
goto out;

Expand All @@ -462,7 +462,7 @@ static int validate_change(const struct cpuset *cur, const struct cpuset *trial)
* overlap
*/
ret = -EINVAL;
cpuset_for_each_child(c, cont, par) {
cpuset_for_each_child(c, cgrp, par) {
if ((is_cpu_exclusive(trial) || is_cpu_exclusive(c)) &&
c != cur &&
cpumask_intersects(trial->cpus_allowed, c->cpus_allowed))
Expand Down Expand Up @@ -1759,13 +1759,13 @@ static size_t cpuset_sprintf_memlist(char *page, struct cpuset *cs)
return count;
}

static ssize_t cpuset_common_file_read(struct cgroup *cont,
static ssize_t cpuset_common_file_read(struct cgroup *cgrp,
struct cftype *cft,
struct file *file,
char __user *buf,
size_t nbytes, loff_t *ppos)
{
struct cpuset *cs = cgroup_cs(cont);
struct cpuset *cs = cgroup_cs(cgrp);
cpuset_filetype_t type = cft->private;
char *page;
ssize_t retval = 0;
Expand Down Expand Up @@ -1795,9 +1795,9 @@ static ssize_t cpuset_common_file_read(struct cgroup *cont,
return retval;
}

static u64 cpuset_read_u64(struct cgroup *cont, struct cftype *cft)
static u64 cpuset_read_u64(struct cgroup *cgrp, struct cftype *cft)
{
struct cpuset *cs = cgroup_cs(cont);
struct cpuset *cs = cgroup_cs(cgrp);
cpuset_filetype_t type = cft->private;
switch (type) {
case FILE_CPU_EXCLUSIVE:
Expand Down Expand Up @@ -1826,9 +1826,9 @@ static u64 cpuset_read_u64(struct cgroup *cont, struct cftype *cft)
return 0;
}

static s64 cpuset_read_s64(struct cgroup *cont, struct cftype *cft)
static s64 cpuset_read_s64(struct cgroup *cgrp, struct cftype *cft)
{
struct cpuset *cs = cgroup_cs(cont);
struct cpuset *cs = cgroup_cs(cgrp);
cpuset_filetype_t type = cft->private;
switch (type) {
case FILE_SCHED_RELAX_DOMAIN_LEVEL:
Expand Down Expand Up @@ -1940,14 +1940,14 @@ static struct cftype files[] = {

/*
* cpuset_css_alloc - allocate a cpuset css
* cont: control group that the new cpuset will be part of
* cgrp: control group that the new cpuset will be part of
*/

static struct cgroup_subsys_state *cpuset_css_alloc(struct cgroup *cont)
static struct cgroup_subsys_state *cpuset_css_alloc(struct cgroup *cgrp)
{
struct cpuset *cs;

if (!cont->parent)
if (!cgrp->parent)
return &top_cpuset.css;

cs = kzalloc(sizeof(*cs), GFP_KERNEL);
Expand Down Expand Up @@ -2042,9 +2042,9 @@ static void cpuset_css_offline(struct cgroup *cgrp)
* will call rebuild_sched_domains_locked().
*/

static void cpuset_css_free(struct cgroup *cont)
static void cpuset_css_free(struct cgroup *cgrp)
{
struct cpuset *cs = cgroup_cs(cont);
struct cpuset *cs = cgroup_cs(cgrp);

free_cpumask_var(cs->cpus_allowed);
kfree(cs);
Expand Down

0 comments on commit c9e5fe6

Please sign in to comment.