mirror of
				git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
				synced 2025-11-01 09:13:37 +00:00 
			
		
		
		
	slub: Move map/flag clearing to __free_slab
__free_slab does some diagnostics. The resetting of mapcount etc in discard_slab() can interfere with debug processing. So move the reset immediately before the page is freed. Signed-off-by: Christoph Lameter <clameter@sgi.com> Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
This commit is contained in:
		
							parent
							
								
									50ef37b96c
								
							
						
					
					
						commit
						49bd5221ce
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -1125,6 +1125,8 @@ static void __free_slab(struct kmem_cache *s, struct page *page)
 | 
			
		|||
		NR_SLAB_RECLAIMABLE : NR_SLAB_UNRECLAIMABLE,
 | 
			
		||||
		-pages);
 | 
			
		||||
 | 
			
		||||
	__ClearPageSlab(page);
 | 
			
		||||
	reset_page_mapcount(page);
 | 
			
		||||
	__free_pages(page, s->order);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -1154,8 +1156,6 @@ static void discard_slab(struct kmem_cache *s, struct page *page)
 | 
			
		|||
	struct kmem_cache_node *n = get_node(s, page_to_nid(page));
 | 
			
		||||
 | 
			
		||||
	atomic_long_dec(&n->nr_slabs);
 | 
			
		||||
	reset_page_mapcount(page);
 | 
			
		||||
	__ClearPageSlab(page);
 | 
			
		||||
	free_slab(s, page);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue