mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 10:40:15 +02:00 
			
		
		
		
	cgroup: short-circuit cset_cgroup_from_root() on the default hierarchy
Each css_set directly points to the default cgroup it belongs to, so there's no reason to walk the cgrp_links list on the default hierarchy. Signed-off-by: Tejun Heo <tj@kernel.org>
This commit is contained in:
		
							parent
							
								
									5a621e6c95
								
							
						
					
					
						commit
						13d82fb77a
					
				
					 1 changed files with 2 additions and 0 deletions
				
			
		| 
						 | 
					@ -1311,6 +1311,8 @@ static struct cgroup *cset_cgroup_from_root(struct css_set *cset,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (cset == &init_css_set) {
 | 
						if (cset == &init_css_set) {
 | 
				
			||||||
		res = &root->cgrp;
 | 
							res = &root->cgrp;
 | 
				
			||||||
 | 
						} else if (root == &cgrp_dfl_root) {
 | 
				
			||||||
 | 
							res = cset->dfl_cgrp;
 | 
				
			||||||
	} else {
 | 
						} else {
 | 
				
			||||||
		struct cgrp_cset_link *link;
 | 
							struct cgrp_cset_link *link;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue