@@ -793,16 +793,16 @@ static int __cache_free_alien(struct kmem_cache *cachep, void *objp,
793
793
794
794
static inline int cache_free_alien (struct kmem_cache * cachep , void * objp )
795
795
{
796
- int page_node = page_to_nid ( virt_to_page (objp ));
796
+ int slab_node = slab_nid ( virt_to_slab (objp ));
797
797
int node = numa_mem_id ();
798
798
/*
799
799
* Make sure we are not freeing a object from another node to the array
800
800
* cache on this cpu.
801
801
*/
802
- if (likely (node == page_node ))
802
+ if (likely (node == slab_node ))
803
803
return 0 ;
804
804
805
- return __cache_free_alien (cachep , objp , node , page_node );
805
+ return __cache_free_alien (cachep , objp , node , slab_node );
806
806
}
807
807
808
808
/*
@@ -1612,10 +1612,10 @@ static void slab_destroy_debugcheck(struct kmem_cache *cachep,
1612
1612
/**
1613
1613
* slab_destroy - destroy and release all objects in a slab
1614
1614
* @cachep: cache pointer being destroyed
1615
- * @page: page pointer being destroyed
1615
+ * @slab: slab being destroyed
1616
1616
*
1617
- * Destroy all the objs in a slab page , and release the mem back to the system.
1618
- * Before calling the slab page must have been unlinked from the cache. The
1617
+ * Destroy all the objs in a slab, and release the mem back to the system.
1618
+ * Before calling the slab must have been unlinked from the cache. The
1619
1619
* kmem_cache_node ->list_lock is not held/needed.
1620
1620
*/
1621
1621
static void slab_destroy (struct kmem_cache * cachep , struct slab * slab )
@@ -2559,7 +2559,7 @@ static struct slab *cache_grow_begin(struct kmem_cache *cachep,
2559
2559
void * freelist ;
2560
2560
size_t offset ;
2561
2561
gfp_t local_flags ;
2562
- int page_node ;
2562
+ int slab_node ;
2563
2563
struct kmem_cache_node * n ;
2564
2564
struct slab * slab ;
2565
2565
@@ -2585,8 +2585,8 @@ static struct slab *cache_grow_begin(struct kmem_cache *cachep,
2585
2585
if (!slab )
2586
2586
goto failed ;
2587
2587
2588
- page_node = slab_nid (slab );
2589
- n = get_node (cachep , page_node );
2588
+ slab_node = slab_nid (slab );
2589
+ n = get_node (cachep , slab_node );
2590
2590
2591
2591
/* Get colour for the slab, and cal the next value. */
2592
2592
n -> colour_next ++ ;
@@ -2608,7 +2608,7 @@ static struct slab *cache_grow_begin(struct kmem_cache *cachep,
2608
2608
2609
2609
/* Get slab management. */
2610
2610
freelist = alloc_slabmgmt (cachep , slab , offset ,
2611
- local_flags & ~GFP_CONSTRAINT_MASK , page_node );
2611
+ local_flags & ~GFP_CONSTRAINT_MASK , slab_node );
2612
2612
if (OFF_SLAB (cachep ) && !freelist )
2613
2613
goto opps1 ;
2614
2614
0 commit comments