Merge tag 'cgroup-for-6.15-rc3-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup

Pull cgroup fixes from Tejun Heo:

- Fix compilation in CONFIG_LOCKDEP && !CONFIG_PROVE_RCU configurations

- Allow "cpuset_v2_mode" mount option for "cpuset" filesystem type to
make life easier for android

* tag 'cgroup-for-6.15-rc3-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup:
cgroup/cpuset-v1: Add missing support for cpuset_v2_mode
cgroup: Fix compilation issue due to cgroup_mutex not being exported

+30 -1
+30 -1
kernel/cgroup/cgroup.c
··· 90 DEFINE_MUTEX(cgroup_mutex); 91 DEFINE_SPINLOCK(css_set_lock); 92 93 - #ifdef CONFIG_PROVE_RCU 94 EXPORT_SYMBOL_GPL(cgroup_mutex); 95 EXPORT_SYMBOL_GPL(css_set_lock); 96 #endif ··· 2353 }; 2354 2355 #ifdef CONFIG_CPUSETS_V1 2356 static const struct fs_context_operations cpuset_fs_context_ops = { 2357 .get_tree = cgroup1_get_tree, 2358 .free = cgroup_fs_context_free, 2359 }; 2360 2361 /* ··· 2420 static struct file_system_type cpuset_fs_type = { 2421 .name = "cpuset", 2422 .init_fs_context = cpuset_init_fs_context, 2423 .fs_flags = FS_USERNS_MOUNT, 2424 }; 2425 #endif
··· 90 DEFINE_MUTEX(cgroup_mutex); 91 DEFINE_SPINLOCK(css_set_lock); 92 93 + #if (defined CONFIG_PROVE_RCU || defined CONFIG_LOCKDEP) 94 EXPORT_SYMBOL_GPL(cgroup_mutex); 95 EXPORT_SYMBOL_GPL(css_set_lock); 96 #endif ··· 2353 }; 2354 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 + 2383 static const struct fs_context_operations cpuset_fs_context_ops = { 2384 .get_tree = cgroup1_get_tree, 2385 .free = cgroup_fs_context_free, 2386 + .parse_param = cpuset_parse_param, 2387 }; 2388 2389 /* ··· 2392 static struct file_system_type cpuset_fs_type = { 2393 .name = "cpuset", 2394 .init_fs_context = cpuset_init_fs_context, 2395 + .parameters = cpuset_fs_parameters, 2396 .fs_flags = FS_USERNS_MOUNT, 2397 }; 2398 #endif