X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=kernel%2Fcgroup.c;h=3737a682cdf52229ee78efa5c637164ba60dcc28;hb=03cb2dafcbde938ed7d01d4b952ea60e3c4e8532;hp=3fb789f6df9431073c815939dac2015d04e705d6;hpb=9bd47bf9324d4c6a49292d98019938b04791a35d;p=pandora-kernel.git diff --git a/kernel/cgroup.c b/kernel/cgroup.c index 3fb789f6df94..3737a682cdf5 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c @@ -843,6 +843,11 @@ static int parse_cgroupfs_options(char *data, struct cgroup_sb_opts *opts) { char *token, *o = data ?: "all"; + unsigned long mask = (unsigned long)-1; + +#ifdef CONFIG_CPUSETS + mask = ~(1UL << cpuset_subsys_id); +#endif opts->subsys_bits = 0; opts->flags = 0; @@ -887,6 +892,15 @@ static int parse_cgroupfs_options(char *data, } } + /* + * Option noprefix was introduced just for backward compatibility + * with the old cpuset, so we allow noprefix only if mounting just + * the cpuset subsystem. + */ + if (test_bit(ROOT_NOPREFIX, &opts->flags) && + (opts->subsys_bits & mask)) + return -EINVAL; + /* We can't have an empty hierarchy */ if (!opts->subsys_bits) return -EINVAL;