cgroup: remove CGRP_ROOT_OPTION_MASK
cgroup_root->flags only contains CGRP_ROOT_* flags and there's no reason to mask the flags. Remove CGRP_ROOT_OPTION_MASK. This doesn't cause any behavior differences. Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: Li Zefan <lizefan@huawei.com>
This commit is contained in:
parent
1ced953b17
commit
7450e90bbb
|
@ -320,9 +320,6 @@ enum {
|
||||||
|
|
||||||
CGRP_ROOT_NOPREFIX = (1 << 1), /* mounted subsystems have no named prefix */
|
CGRP_ROOT_NOPREFIX = (1 << 1), /* mounted subsystems have no named prefix */
|
||||||
CGRP_ROOT_XATTR = (1 << 2), /* supports extended attributes */
|
CGRP_ROOT_XATTR = (1 << 2), /* supports extended attributes */
|
||||||
|
|
||||||
/* mount options live below bit 16 */
|
|
||||||
CGRP_ROOT_OPTION_MASK = (1 << 16) - 1,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -1490,11 +1490,10 @@ static int cgroup_remount(struct kernfs_root *kf_root, int *flags, char *data)
|
||||||
removed_mask = root->subsys_mask & ~opts.subsys_mask;
|
removed_mask = root->subsys_mask & ~opts.subsys_mask;
|
||||||
|
|
||||||
/* Don't allow flags or name to change at remount */
|
/* Don't allow flags or name to change at remount */
|
||||||
if (((opts.flags ^ root->flags) & CGRP_ROOT_OPTION_MASK) ||
|
if ((opts.flags ^ root->flags) ||
|
||||||
(opts.name && strcmp(opts.name, root->name))) {
|
(opts.name && strcmp(opts.name, root->name))) {
|
||||||
pr_err("option or name mismatch, new: 0x%x \"%s\", old: 0x%x \"%s\"\n",
|
pr_err("option or name mismatch, new: 0x%x \"%s\", old: 0x%x \"%s\"\n",
|
||||||
opts.flags & CGRP_ROOT_OPTION_MASK, opts.name ?: "",
|
opts.flags, opts.name ?: "", root->flags, root->name);
|
||||||
root->flags & CGRP_ROOT_OPTION_MASK, root->name);
|
|
||||||
ret = -EINVAL;
|
ret = -EINVAL;
|
||||||
goto out_unlock;
|
goto out_unlock;
|
||||||
}
|
}
|
||||||
|
@ -1762,7 +1761,7 @@ static struct dentry *cgroup_mount(struct file_system_type *fs_type,
|
||||||
goto out_unlock;
|
goto out_unlock;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((root->flags ^ opts.flags) & CGRP_ROOT_OPTION_MASK) {
|
if (root->flags ^ opts.flags) {
|
||||||
if ((root->flags | opts.flags) & CGRP_ROOT_SANE_BEHAVIOR) {
|
if ((root->flags | opts.flags) & CGRP_ROOT_SANE_BEHAVIOR) {
|
||||||
pr_err("sane_behavior: new mount options should match the existing superblock\n");
|
pr_err("sane_behavior: new mount options should match the existing superblock\n");
|
||||||
ret = -EINVAL;
|
ret = -EINVAL;
|
||||||
|
|
Loading…
Reference in New Issue