@@ -206,13 +206,13 @@ EXPORT_SYMBOL_GPL(cgrp_dfl_root);
206206bool cgrp_dfl_visible ;
207207
208208/* some controllers are not supported in the default hierarchy */
209- static u16 cgrp_dfl_inhibit_ss_mask ;
209+ static u32 cgrp_dfl_inhibit_ss_mask ;
210210
211211/* some controllers are implicitly enabled on the default hierarchy */
212- static u16 cgrp_dfl_implicit_ss_mask ;
212+ static u32 cgrp_dfl_implicit_ss_mask ;
213213
214214/* some controllers can be threaded on the default hierarchy */
215- static u16 cgrp_dfl_threaded_ss_mask ;
215+ static u32 cgrp_dfl_threaded_ss_mask ;
216216
217217/* The list of hierarchy roots */
218218LIST_HEAD (cgroup_roots );
@@ -234,10 +234,10 @@ static u64 css_serial_nr_next = 1;
234234 * These bitmasks identify subsystems with specific features to avoid
235235 * having to do iterative checks repeatedly.
236236 */
237- static u16 have_fork_callback __read_mostly ;
238- static u16 have_exit_callback __read_mostly ;
239- static u16 have_release_callback __read_mostly ;
240- static u16 have_canfork_callback __read_mostly ;
237+ static u32 have_fork_callback __read_mostly ;
238+ static u32 have_exit_callback __read_mostly ;
239+ static u32 have_release_callback __read_mostly ;
240+ static u32 have_canfork_callback __read_mostly ;
241241
242242static bool have_favordynmods __ro_after_init = IS_ENABLED (CONFIG_CGROUP_FAVOR_DYNMODS );
243243
@@ -475,13 +475,13 @@ static bool cgroup_is_valid_domain(struct cgroup *cgrp)
475475}
476476
477477/* subsystems visibly enabled on a cgroup */
478- static u16 cgroup_control (struct cgroup * cgrp )
478+ static u32 cgroup_control (struct cgroup * cgrp )
479479{
480480 struct cgroup * parent = cgroup_parent (cgrp );
481- u16 root_ss_mask = cgrp -> root -> subsys_mask ;
481+ u32 root_ss_mask = cgrp -> root -> subsys_mask ;
482482
483483 if (parent ) {
484- u16 ss_mask = parent -> subtree_control ;
484+ u32 ss_mask = parent -> subtree_control ;
485485
486486 /* threaded cgroups can only have threaded controllers */
487487 if (cgroup_is_threaded (cgrp ))
@@ -496,12 +496,12 @@ static u16 cgroup_control(struct cgroup *cgrp)
496496}
497497
498498/* subsystems enabled on a cgroup */
499- static u16 cgroup_ss_mask (struct cgroup * cgrp )
499+ static u32 cgroup_ss_mask (struct cgroup * cgrp )
500500{
501501 struct cgroup * parent = cgroup_parent (cgrp );
502502
503503 if (parent ) {
504- u16 ss_mask = parent -> subtree_ss_mask ;
504+ u32 ss_mask = parent -> subtree_ss_mask ;
505505
506506 /* threaded cgroups can only have threaded controllers */
507507 if (cgroup_is_threaded (cgrp ))
@@ -1636,9 +1636,9 @@ static umode_t cgroup_file_mode(const struct cftype *cft)
16361636 * This function calculates which subsystems need to be enabled if
16371637 * @subtree_control is to be applied while restricted to @this_ss_mask.
16381638 */
1639- static u16 cgroup_calc_subtree_ss_mask (u16 subtree_control , u16 this_ss_mask )
1639+ static u32 cgroup_calc_subtree_ss_mask (u32 subtree_control , u32 this_ss_mask )
16401640{
1641- u16 cur_ss_mask = subtree_control ;
1641+ u32 cur_ss_mask = subtree_control ;
16421642 struct cgroup_subsys * ss ;
16431643 int ssid ;
16441644
@@ -1647,7 +1647,7 @@ static u16 cgroup_calc_subtree_ss_mask(u16 subtree_control, u16 this_ss_mask)
16471647 cur_ss_mask |= cgrp_dfl_implicit_ss_mask ;
16481648
16491649 while (true) {
1650- u16 new_ss_mask = cur_ss_mask ;
1650+ u32 new_ss_mask = cur_ss_mask ;
16511651
16521652 do_each_subsys_mask (ss , ssid , cur_ss_mask ) {
16531653 new_ss_mask |= ss -> depends_on ;
@@ -1851,12 +1851,12 @@ static int css_populate_dir(struct cgroup_subsys_state *css)
18511851 return ret ;
18521852}
18531853
1854- int rebind_subsystems (struct cgroup_root * dst_root , u16 ss_mask )
1854+ int rebind_subsystems (struct cgroup_root * dst_root , u32 ss_mask )
18551855{
18561856 struct cgroup * dcgrp = & dst_root -> cgrp ;
18571857 struct cgroup_subsys * ss ;
18581858 int ssid , ret ;
1859- u16 dfl_disable_ss_mask = 0 ;
1859+ u32 dfl_disable_ss_mask = 0 ;
18601860
18611861 lockdep_assert_held (& cgroup_mutex );
18621862
@@ -2152,7 +2152,7 @@ void init_cgroup_root(struct cgroup_fs_context *ctx)
21522152 set_bit (CGRP_CPUSET_CLONE_CHILDREN , & root -> cgrp .flags );
21532153}
21542154
2155- int cgroup_setup_root (struct cgroup_root * root , u16 ss_mask )
2155+ int cgroup_setup_root (struct cgroup_root * root , u32 ss_mask )
21562156{
21572157 LIST_HEAD (tmp_links );
21582158 struct cgroup * root_cgrp = & root -> cgrp ;
@@ -3134,7 +3134,7 @@ void cgroup_procs_write_finish(struct task_struct *task,
31343134 put_task_struct (task );
31353135}
31363136
3137- static void cgroup_print_ss_mask (struct seq_file * seq , u16 ss_mask )
3137+ static void cgroup_print_ss_mask (struct seq_file * seq , u32 ss_mask )
31383138{
31393139 struct cgroup_subsys * ss ;
31403140 bool printed = false;
@@ -3499,9 +3499,9 @@ static void cgroup_finalize_control(struct cgroup *cgrp, int ret)
34993499 cgroup_apply_control_disable (cgrp );
35003500}
35013501
3502- static int cgroup_vet_subtree_control_enable (struct cgroup * cgrp , u16 enable )
3502+ static int cgroup_vet_subtree_control_enable (struct cgroup * cgrp , u32 enable )
35033503{
3504- u16 domain_enable = enable & ~cgrp_dfl_threaded_ss_mask ;
3504+ u32 domain_enable = enable & ~cgrp_dfl_threaded_ss_mask ;
35053505
35063506 /* if nothing is getting enabled, nothing to worry about */
35073507 if (!enable )
@@ -3544,7 +3544,7 @@ static ssize_t cgroup_subtree_control_write(struct kernfs_open_file *of,
35443544 char * buf , size_t nbytes ,
35453545 loff_t off )
35463546{
3547- u16 enable = 0 , disable = 0 ;
3547+ u32 enable = 0 , disable = 0 ;
35483548 struct cgroup * cgrp , * child ;
35493549 struct cgroup_subsys * ss ;
35503550 char * tok ;
@@ -6350,7 +6350,7 @@ int __init cgroup_init(void)
63506350 struct cgroup_subsys * ss ;
63516351 int ssid ;
63526352
6353- BUILD_BUG_ON (CGROUP_SUBSYS_COUNT > 16 );
6353+ BUILD_BUG_ON (CGROUP_SUBSYS_COUNT > 32 );
63546354 BUG_ON (cgroup_init_cftypes (NULL , cgroup_base_files ));
63556355 BUG_ON (cgroup_init_cftypes (NULL , cgroup_psi_files ));
63566356 BUG_ON (cgroup_init_cftypes (NULL , cgroup1_base_files ));
0 commit comments