aboutsummaryrefslogtreecommitdiffstats
path: root/mm/slab.c
diff options
context:
space:
mode:
authorJoonsoo Kim <iamjoonsoo.kim@lge.com>2013-10-23 21:07:51 -0400
committerPekka Enberg <penberg@iki.fi>2013-10-24 13:17:34 -0400
commite7444d9b7d49898a667074122bed2dcedf349305 (patch)
treee0bebec6510413183c47e010a88e576734be7382 /mm/slab.c
parent7ecccf9d1e416fe61bb1caa0a94605b522feeaf3 (diff)
slab: rename slab_bufctl to slab_freelist
Now, bufctl is not proper name to this array. So change it. Acked-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com> Signed-off-by: Pekka Enberg <penberg@iki.fi>
Diffstat (limited to 'mm/slab.c')
-rw-r--r--mm/slab.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/mm/slab.c b/mm/slab.c
index fbb594f2259a..af2db76e1f5a 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -2550,7 +2550,7 @@ static struct freelist *alloc_slabmgmt(struct kmem_cache *cachep,
2550 return freelist; 2550 return freelist;
2551} 2551}
2552 2552
2553static inline unsigned int *slab_bufctl(struct page *page) 2553static inline unsigned int *slab_freelist(struct page *page)
2554{ 2554{
2555 return (unsigned int *)(page->freelist); 2555 return (unsigned int *)(page->freelist);
2556} 2556}
@@ -2597,7 +2597,7 @@ static void cache_init_objs(struct kmem_cache *cachep,
2597 if (cachep->ctor) 2597 if (cachep->ctor)
2598 cachep->ctor(objp); 2598 cachep->ctor(objp);
2599#endif 2599#endif
2600 slab_bufctl(page)[i] = i; 2600 slab_freelist(page)[i] = i;
2601 } 2601 }
2602} 2602}
2603 2603
@@ -2616,7 +2616,7 @@ static void *slab_get_obj(struct kmem_cache *cachep, struct page *page,
2616{ 2616{
2617 void *objp; 2617 void *objp;
2618 2618
2619 objp = index_to_obj(cachep, page, slab_bufctl(page)[page->active]); 2619 objp = index_to_obj(cachep, page, slab_freelist(page)[page->active]);
2620 page->active++; 2620 page->active++;
2621#if DEBUG 2621#if DEBUG
2622 WARN_ON(page_to_nid(virt_to_page(objp)) != nodeid); 2622 WARN_ON(page_to_nid(virt_to_page(objp)) != nodeid);
@@ -2637,7 +2637,7 @@ static void slab_put_obj(struct kmem_cache *cachep, struct page *page,
2637 2637
2638 /* Verify double free bug */ 2638 /* Verify double free bug */
2639 for (i = page->active; i < cachep->num; i++) { 2639 for (i = page->active; i < cachep->num; i++) {
2640 if (slab_bufctl(page)[i] == objnr) { 2640 if (slab_freelist(page)[i] == objnr) {
2641 printk(KERN_ERR "slab: double free detected in cache " 2641 printk(KERN_ERR "slab: double free detected in cache "
2642 "'%s', objp %p\n", cachep->name, objp); 2642 "'%s', objp %p\n", cachep->name, objp);
2643 BUG(); 2643 BUG();
@@ -2645,7 +2645,7 @@ static void slab_put_obj(struct kmem_cache *cachep, struct page *page,
2645 } 2645 }
2646#endif 2646#endif
2647 page->active--; 2647 page->active--;
2648 slab_bufctl(page)[page->active] = objnr; 2648 slab_freelist(page)[page->active] = objnr;
2649} 2649}
2650 2650
2651/* 2651/*
@@ -4218,7 +4218,7 @@ static void handle_slab(unsigned long *n, struct kmem_cache *c,
4218 4218
4219 for (j = page->active; j < c->num; j++) { 4219 for (j = page->active; j < c->num; j++) {
4220 /* Skip freed item */ 4220 /* Skip freed item */
4221 if (slab_bufctl(page)[j] == i) { 4221 if (slab_freelist(page)[j] == i) {
4222 active = false; 4222 active = false;
4223 break; 4223 break;
4224 } 4224 }