Skip to content
  • Andrew Morton's avatar
    [PATCH] __get_page_state() cpumask cleanup and fix · b40607fc
    Andrew Morton authored
    
    
    __get_page_state() has an open-coded for_each_cpu_mask() loop in it.
    
    Tidy that up, then notice that the code was buggy:
    
    	while (cpu < NR_CPUS) {
    		unsigned long *in, *out, off;
    
    		if (!cpu_isset(cpu, *cpumask))
    			continue;
    
    an obvious infinite loop.  I guess we just never call it with a holey cpu
    mask.
    
    Even after my cpumask size-reduction work, this patch increases code size :(
    
    Cc: Paul Jackson <pj@sgi.com>
    Cc: Christoph Lameter <clameter@engr.sgi.com>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    b40607fc