workqueue: fix incorrect cpu number BUG_ON() in get_work_gcwq()
get_work_gcwq() was incorrectly triggering BUG_ON() if cpu number is equal to or higher than num_possible_cpus() instead of nr_cpu_ids. Fix it. Signed-off-by: Tejun Heo <tj@kernel.org>
This commit is contained in:
		
					parent
					
						
							
								4ce48b37bf
							
						
					
				
			
			
				commit
				
					
						a1e453d279
					
				
			
		
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -445,7 +445,7 @@ static struct global_cwq *get_work_gcwq(struct work_struct *work)
 | 
				
			||||||
	if (cpu == NR_CPUS)
 | 
						if (cpu == NR_CPUS)
 | 
				
			||||||
		return NULL;
 | 
							return NULL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	BUG_ON(cpu >= num_possible_cpus());
 | 
						BUG_ON(cpu >= nr_cpu_ids);
 | 
				
			||||||
	return get_gcwq(cpu);
 | 
						return get_gcwq(cpu);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue