mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-07-16 17:57:38 -04:00
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
This commit is contained in:
@@ -1001,7 +1001,7 @@ static int check_cgroupfs_options(struct fs_context *fc)
|
||||
ctx->subsys_mask &= enabled;
|
||||
|
||||
/*
|
||||
* In absense of 'none', 'name=' or subsystem name options,
|
||||
* In absence of 'none', 'name=' and subsystem name options,
|
||||
* let's default to 'all'.
|
||||
*/
|
||||
if (!ctx->subsys_mask && !ctx->none && !ctx->name)
|
||||
|
||||
@@ -468,7 +468,7 @@ static struct cgroup_subsys_state *cgroup_css(struct cgroup *cgrp,
|
||||
* @cgrp: the cgroup of interest
|
||||
* @ss: the subsystem of interest
|
||||
*
|
||||
* Find and get @cgrp's css assocaited with @ss. If the css doesn't exist
|
||||
* Find and get @cgrp's css associated with @ss. If the css doesn't exist
|
||||
* or is offline, %NULL is returned.
|
||||
*/
|
||||
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)
|
||||
|
||||
/**
|
||||
* css_clear_dir - remove subsys files in a cgroup directory
|
||||
* @css: taget css
|
||||
* @css: target css
|
||||
*/
|
||||
static void css_clear_dir(struct cgroup_subsys_state *css)
|
||||
{
|
||||
@@ -5350,7 +5350,7 @@ int cgroup_mkdir(struct kernfs_node *parent_kn, const char *name, umode_t mode)
|
||||
/*
|
||||
* This is called when the refcnt of a css is confirmed to be killed.
|
||||
* css_tryget_online() is now guaranteed to fail. Tell the subsystem to
|
||||
* initate destruction and put the css ref from kill_css().
|
||||
* initiate destruction and put the css ref from kill_css().
|
||||
*/
|
||||
static void css_killed_work_fn(struct work_struct *work)
|
||||
{
|
||||
@@ -5634,8 +5634,6 @@ int __init cgroup_init_early(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static u16 cgroup_disable_mask __initdata;
|
||||
|
||||
/**
|
||||
* cgroup_init - cgroup initialization
|
||||
*
|
||||
@@ -5694,12 +5692,8 @@ int __init cgroup_init(void)
|
||||
* disabled flag and cftype registration needs kmalloc,
|
||||
* both of which aren't available during early_init.
|
||||
*/
|
||||
if (cgroup_disable_mask & (1 << ssid)) {
|
||||
static_branch_disable(cgroup_subsys_enabled_key[ssid]);
|
||||
printk(KERN_INFO "Disabling %s control group subsystem\n",
|
||||
ss->name);
|
||||
if (!cgroup_ssid_enabled(ssid))
|
||||
continue;
|
||||
}
|
||||
|
||||
if (cgroup1_ssid_disabled(ssid))
|
||||
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)
|
||||
* @kargs: the arguments passed to create the child process
|
||||
*
|
||||
* This calls the cancel_fork() callbacks if a fork failed *after*
|
||||
* cgroup_can_fork() succeded and cleans up references we took to
|
||||
* cgroup_can_fork() succeeded and cleans up references we took to
|
||||
* prepare a new css_set for the child process in cgroup_can_fork().
|
||||
*/
|
||||
void cgroup_cancel_fork(struct task_struct *child,
|
||||
@@ -6214,7 +6208,10 @@ static int __init cgroup_disable(char *str)
|
||||
if (strcmp(token, ss->name) &&
|
||||
strcmp(token, ss->legacy_name))
|
||||
continue;
|
||||
cgroup_disable_mask |= 1 << i;
|
||||
|
||||
static_branch_disable(cgroup_subsys_enabled_key[i]);
|
||||
pr_info("Disabling %s control group subsystem\n",
|
||||
ss->name);
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
|
||||
@@ -3376,7 +3376,7 @@ nodemask_t cpuset_mems_allowed(struct task_struct *tsk)
|
||||
}
|
||||
|
||||
/**
|
||||
* cpuset_nodemask_valid_mems_allowed - check nodemask vs. curremt mems_allowed
|
||||
* cpuset_nodemask_valid_mems_allowed - check nodemask vs. current mems_allowed
|
||||
* @nodemask: the nodemask to be checked
|
||||
*
|
||||
* Are any of the nodes in the nodemask allowed in current->mems_allowed?
|
||||
|
||||
@@ -244,7 +244,7 @@ EXPORT_SYMBOL(rdmacg_uncharge);
|
||||
* This function follows charging resource in hierarchical way.
|
||||
* It will fail if the charge would cause the new value to exceed the
|
||||
* hierarchical limit.
|
||||
* Returns 0 if the charge succeded, otherwise -EAGAIN, -ENOMEM or -EINVAL.
|
||||
* Returns 0 if the charge succeeded, otherwise -EAGAIN, -ENOMEM or -EINVAL.
|
||||
* Returns pointer to rdmacg for this resource when charging is successful.
|
||||
*
|
||||
* Charger needs to account resources on two criteria.
|
||||
|
||||
@@ -75,7 +75,7 @@ void cgroup_rstat_updated(struct cgroup *cgrp, int cpu)
|
||||
* @root: root of the tree to traversal
|
||||
* @cpu: target cpu
|
||||
*
|
||||
* Walks the udpated rstat_cpu tree on @cpu from @root. %NULL @pos starts
|
||||
* Walks the updated rstat_cpu tree on @cpu from @root. %NULL @pos starts
|
||||
* the traversal and %NULL return indicates the end. During traversal,
|
||||
* each returned cgroup is unlinked from the tree. Must be called with the
|
||||
* matching cgroup_rstat_cpu_lock held.
|
||||
|
||||
Reference in New Issue
Block a user