Skip to content

Commit 1434a31

Browse files
committed
Merge branch 'for-5.13-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup
Pull cgroup fixes from Tejun Heo: - "cgroup_disable=" boot param was being applied too late confusing some subsystems. Fix it by moving application to __setup() time. - Comment spelling fixes. Included here to lower the chance of trivial future merge conflicts. * 'for-5.13-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: cgroup: fix spelling mistakes cgroup: disable controllers at parse time
2 parents 5df7ae7 + 08b2b6f commit 1434a31

7 files changed

Lines changed: 17 additions & 20 deletions

File tree

‎include/linux/cgroup-defs.h‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ struct css_set {
232232
struct list_head task_iters;
233233

234234
/*
235-
* On the default hierarhcy, ->subsys[ssid] may point to a css
235+
* On the default hierarchy, ->subsys[ssid] may point to a css
236236
* attached to an ancestor instead of the cgroup this css_set is
237237
* associated with. The following node is anchored at
238238
* ->subsys[ssid]->cgroup->e_csets[ssid] and provides a way to
@@ -668,7 +668,7 @@ struct cgroup_subsys {
668668
*/
669669
bool threaded:1;
670670

671-
/* the following two fields are initialized automtically during boot */
671+
/* the following two fields are initialized automatically during boot */
672672
int id;
673673
const char *name;
674674

@@ -757,7 +757,7 @@ static inline void cgroup_threadgroup_change_end(struct task_struct *tsk) {}
757757
* sock_cgroup_data overloads (prioidx, classid) and the cgroup pointer.
758758
* On boot, sock_cgroup_data records the cgroup that the sock was created
759759
* in so that cgroup2 matches can be made; however, once either net_prio or
760-
* net_cls starts being used, the area is overriden to carry prioidx and/or
760+
* net_cls starts being used, the area is overridden to carry prioidx and/or
761761
* classid. The two modes are distinguished by whether the lowest bit is
762762
* set. Clear bit indicates cgroup pointer while set bit prioidx and
763763
* classid.

‎include/linux/cgroup.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ struct kernel_clone_args;
3232
#ifdef CONFIG_CGROUPS
3333

3434
/*
35-
* All weight knobs on the default hierarhcy should use the following min,
35+
* All weight knobs on the default hierarchy should use the following min,
3636
* default and max values. The default value is the logarithmic center of
3737
* MIN and MAX and allows 100x to be expressed in both directions.
3838
*/

‎kernel/cgroup/cgroup-v1.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1001,7 +1001,7 @@ static int check_cgroupfs_options(struct fs_context *fc)
10011001
ctx->subsys_mask &= enabled;
10021002

10031003
/*
1004-
* In absense of 'none', 'name=' or subsystem name options,
1004+
* In absence of 'none', 'name=' and subsystem name options,
10051005
* let's default to 'all'.
10061006
*/
10071007
if (!ctx->subsys_mask && !ctx->none && !ctx->name)

‎kernel/cgroup/cgroup.c‎

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ static struct cgroup_subsys_state *cgroup_css(struct cgroup *cgrp,
468468
* @cgrp: the cgroup of interest
469469
* @ss: the subsystem of interest
470470
*
471-
* Find and get @cgrp's css assocaited with @ss. If the css doesn't exist
471+
* Find and get @cgrp's css associated with @ss. If the css doesn't exist
472472
* or is offline, %NULL is returned.
473473
*/
474474
static struct cgroup_subsys_state *cgroup_tryget_css(struct cgroup *cgrp,
@@ -1633,7 +1633,7 @@ static void cgroup_rm_file(struct cgroup *cgrp, const struct cftype *cft)
16331633

16341634
/**
16351635
* css_clear_dir - remove subsys files in a cgroup directory
1636-
* @css: taget css
1636+
* @css: target css
16371637
*/
16381638
static void css_clear_dir(struct cgroup_subsys_state *css)
16391639
{
@@ -5350,7 +5350,7 @@ int cgroup_mkdir(struct kernfs_node *parent_kn, const char *name, umode_t mode)
53505350
/*
53515351
* This is called when the refcnt of a css is confirmed to be killed.
53525352
* css_tryget_online() is now guaranteed to fail. Tell the subsystem to
5353-
* initate destruction and put the css ref from kill_css().
5353+
* initiate destruction and put the css ref from kill_css().
53545354
*/
53555355
static void css_killed_work_fn(struct work_struct *work)
53565356
{
@@ -5634,8 +5634,6 @@ int __init cgroup_init_early(void)
56345634
return 0;
56355635
}
56365636

5637-
static u16 cgroup_disable_mask __initdata;
5638-
56395637
/**
56405638
* cgroup_init - cgroup initialization
56415639
*
@@ -5694,12 +5692,8 @@ int __init cgroup_init(void)
56945692
* disabled flag and cftype registration needs kmalloc,
56955693
* both of which aren't available during early_init.
56965694
*/
5697-
if (cgroup_disable_mask & (1 << ssid)) {
5698-
static_branch_disable(cgroup_subsys_enabled_key[ssid]);
5699-
printk(KERN_INFO "Disabling %s control group subsystem\n",
5700-
ss->name);
5695+
if (!cgroup_ssid_enabled(ssid))
57015696
continue;
5702-
}
57035697

57045698
if (cgroup1_ssid_disabled(ssid))
57055699
printk(KERN_INFO "Disabling %s control group subsystem in v1 mounts\n",
@@ -6058,7 +6052,7 @@ int cgroup_can_fork(struct task_struct *child, struct kernel_clone_args *kargs)
60586052
* @kargs: the arguments passed to create the child process
60596053
*
60606054
* This calls the cancel_fork() callbacks if a fork failed *after*
6061-
* cgroup_can_fork() succeded and cleans up references we took to
6055+
* cgroup_can_fork() succeeded and cleans up references we took to
60626056
* prepare a new css_set for the child process in cgroup_can_fork().
60636057
*/
60646058
void cgroup_cancel_fork(struct task_struct *child,
@@ -6214,7 +6208,10 @@ static int __init cgroup_disable(char *str)
62146208
if (strcmp(token, ss->name) &&
62156209
strcmp(token, ss->legacy_name))
62166210
continue;
6217-
cgroup_disable_mask |= 1 << i;
6211+
6212+
static_branch_disable(cgroup_subsys_enabled_key[i]);
6213+
pr_info("Disabling %s control group subsystem\n",
6214+
ss->name);
62186215
}
62196216
}
62206217
return 1;

‎kernel/cgroup/cpuset.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3376,7 +3376,7 @@ nodemask_t cpuset_mems_allowed(struct task_struct *tsk)
33763376
}
33773377

33783378
/**
3379-
* cpuset_nodemask_valid_mems_allowed - check nodemask vs. curremt mems_allowed
3379+
* cpuset_nodemask_valid_mems_allowed - check nodemask vs. current mems_allowed
33803380
* @nodemask: the nodemask to be checked
33813381
*
33823382
* Are any of the nodes in the nodemask allowed in current->mems_allowed?

‎kernel/cgroup/rdma.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ EXPORT_SYMBOL(rdmacg_uncharge);
244244
* This function follows charging resource in hierarchical way.
245245
* It will fail if the charge would cause the new value to exceed the
246246
* hierarchical limit.
247-
* Returns 0 if the charge succeded, otherwise -EAGAIN, -ENOMEM or -EINVAL.
247+
* Returns 0 if the charge succeeded, otherwise -EAGAIN, -ENOMEM or -EINVAL.
248248
* Returns pointer to rdmacg for this resource when charging is successful.
249249
*
250250
* Charger needs to account resources on two criteria.

‎kernel/cgroup/rstat.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ void cgroup_rstat_updated(struct cgroup *cgrp, int cpu)
7575
* @root: root of the tree to traversal
7676
* @cpu: target cpu
7777
*
78-
* Walks the udpated rstat_cpu tree on @cpu from @root. %NULL @pos starts
78+
* Walks the updated rstat_cpu tree on @cpu from @root. %NULL @pos starts
7979
* the traversal and %NULL return indicates the end. During traversal,
8080
* each returned cgroup is unlinked from the tree. Must be called with the
8181
* matching cgroup_rstat_cpu_lock held.

0 commit comments

Comments
 (0)