|
90 | 90 | DEFINE_MUTEX(cgroup_mutex);
|
91 | 91 | DEFINE_SPINLOCK(css_set_lock);
|
92 | 92 |
|
93 |
| -#ifdef CONFIG_PROVE_RCU |
| 93 | +#if (defined CONFIG_PROVE_RCU || defined CONFIG_LOCKDEP) |
94 | 94 | EXPORT_SYMBOL_GPL(cgroup_mutex);
|
95 | 95 | EXPORT_SYMBOL_GPL(css_set_lock);
|
96 | 96 | #endif
|
@@ -2353,9 +2353,37 @@ static struct file_system_type cgroup2_fs_type = {
|
2353 | 2353 | };
|
2354 | 2354 |
|
2355 | 2355 | #ifdef CONFIG_CPUSETS_V1
|
| 2356 | +enum cpuset_param { |
| 2357 | + Opt_cpuset_v2_mode, |
| 2358 | +}; |
| 2359 | + |
| 2360 | +static const struct fs_parameter_spec cpuset_fs_parameters[] = { |
| 2361 | + fsparam_flag ("cpuset_v2_mode", Opt_cpuset_v2_mode), |
| 2362 | + {} |
| 2363 | +}; |
| 2364 | + |
| 2365 | +static int cpuset_parse_param(struct fs_context *fc, struct fs_parameter *param) |
| 2366 | +{ |
| 2367 | + struct cgroup_fs_context *ctx = cgroup_fc2context(fc); |
| 2368 | + struct fs_parse_result result; |
| 2369 | + int opt; |
| 2370 | + |
| 2371 | + opt = fs_parse(fc, cpuset_fs_parameters, param, &result); |
| 2372 | + if (opt < 0) |
| 2373 | + return opt; |
| 2374 | + |
| 2375 | + switch (opt) { |
| 2376 | + case Opt_cpuset_v2_mode: |
| 2377 | + ctx->flags |= CGRP_ROOT_CPUSET_V2_MODE; |
| 2378 | + return 0; |
| 2379 | + } |
| 2380 | + return -EINVAL; |
| 2381 | +} |
| 2382 | + |
2356 | 2383 | static const struct fs_context_operations cpuset_fs_context_ops = {
|
2357 | 2384 | .get_tree = cgroup1_get_tree,
|
2358 | 2385 | .free = cgroup_fs_context_free,
|
| 2386 | + .parse_param = cpuset_parse_param, |
2359 | 2387 | };
|
2360 | 2388 |
|
2361 | 2389 | /*
|
@@ -2392,6 +2420,7 @@ static int cpuset_init_fs_context(struct fs_context *fc)
|
2392 | 2420 | static struct file_system_type cpuset_fs_type = {
|
2393 | 2421 | .name = "cpuset",
|
2394 | 2422 | .init_fs_context = cpuset_init_fs_context,
|
| 2423 | + .parameters = cpuset_fs_parameters, |
2395 | 2424 | .fs_flags = FS_USERNS_MOUNT,
|
2396 | 2425 | };
|
2397 | 2426 | #endif
|
|
0 commit comments