Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 03c78cbe authored by Li Zefan's avatar Li Zefan Committed by Tejun Heo
Browse files

cgroup: 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: default avatarLi Zefan <lizefan@huawei.com>
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
parent 00356bd5
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -433,13 +433,13 @@ struct cftype {
	 * entry. The key/value pairs (and their ordering) should not
	 * entry. The key/value pairs (and their ordering) should not
	 * change between reboots.
	 * change between reboots.
	 */
	 */
	int (*read_map)(struct cgroup *cont, struct cftype *cft,
	int (*read_map)(struct cgroup *cgrp, struct cftype *cft,
			struct cgroup_map_cb *cb);
			struct cgroup_map_cb *cb);
	/*
	/*
	 * read_seq_string() is used for outputting a simple sequence
	 * read_seq_string() is used for outputting a simple sequence
	 * using seqfile.
	 * using seqfile.
	 */
	 */
	int (*read_seq_string)(struct cgroup *cont, struct cftype *cft,
	int (*read_seq_string)(struct cgroup *cgrp, struct cftype *cft,
			       struct seq_file *m);
			       struct seq_file *m);


	ssize_t (*write)(struct cgroup *cgrp, struct cftype *cft,
	ssize_t (*write)(struct cgroup *cgrp, struct cftype *cft,
+11 −11
Original line number Original line Diff line number Diff line
@@ -5515,7 +5515,7 @@ struct cgroup_subsys_state *cgroup_css_from_dir(struct file *f, int id)
}
}


#ifdef CONFIG_CGROUP_DEBUG
#ifdef CONFIG_CGROUP_DEBUG
static struct cgroup_subsys_state *debug_css_alloc(struct cgroup *cont)
static struct cgroup_subsys_state *debug_css_alloc(struct cgroup *cgrp)
{
{
	struct cgroup_subsys_state *css = kzalloc(sizeof(*css), GFP_KERNEL);
	struct cgroup_subsys_state *css = kzalloc(sizeof(*css), GFP_KERNEL);


@@ -5525,22 +5525,22 @@ static struct cgroup_subsys_state *debug_css_alloc(struct cgroup *cont)
	return css;
	return css;
}
}


static void debug_css_free(struct cgroup *cont)
static void debug_css_free(struct cgroup *cgrp)
{
{
	kfree(cont->subsys[debug_subsys_id]);
	kfree(cgrp->subsys[debug_subsys_id]);
}
}


static u64 debug_taskcount_read(struct cgroup *cont, struct cftype *cft)
static u64 debug_taskcount_read(struct cgroup *cgrp, struct cftype *cft)
{
{
	return cgroup_task_count(cont);
	return cgroup_task_count(cgrp);
}
}


static u64 current_css_set_read(struct cgroup *cont, struct cftype *cft)
static u64 current_css_set_read(struct cgroup *cgrp, struct cftype *cft)
{
{
	return (u64)(unsigned long)current->cgroups;
	return (u64)(unsigned long)current->cgroups;
}
}


static u64 current_css_set_refcount_read(struct cgroup *cont,
static u64 current_css_set_refcount_read(struct cgroup *cgrp,
					 struct cftype *cft)
					 struct cftype *cft)
{
{
	u64 count;
	u64 count;
@@ -5551,7 +5551,7 @@ static u64 current_css_set_refcount_read(struct cgroup *cont,
	return count;
	return count;
}
}


static int current_css_set_cg_links_read(struct cgroup *cont,
static int current_css_set_cg_links_read(struct cgroup *cgrp,
					 struct cftype *cft,
					 struct cftype *cft,
					 struct seq_file *seq)
					 struct seq_file *seq)
{
{
@@ -5578,14 +5578,14 @@ static int current_css_set_cg_links_read(struct cgroup *cont,
}
}


#define MAX_TASKS_SHOWN_PER_CSS 25
#define MAX_TASKS_SHOWN_PER_CSS 25
static int cgroup_css_links_read(struct cgroup *cont,
static int cgroup_css_links_read(struct cgroup *cgrp,
				 struct cftype *cft,
				 struct cftype *cft,
				 struct seq_file *seq)
				 struct seq_file *seq)
{
{
	struct cgrp_cset_link *link;
	struct cgrp_cset_link *link;


	read_lock(&css_set_lock);
	read_lock(&css_set_lock);
	list_for_each_entry(link, &cont->cset_links, cset_link) {
	list_for_each_entry(link, &cgrp->cset_links, cset_link) {
		struct css_set *cset = link->cset;
		struct css_set *cset = link->cset;
		struct task_struct *task;
		struct task_struct *task;
		int count = 0;
		int count = 0;