Commit e79aec29 authored by Rabin Vincent's avatar Rabin Vincent Committed by Pekka Enberg

slab: rename slab_destroy_objs

With the removal of destructors, slab_destroy_objs no longer actually
destroys any objects, making the kernel doc incorrect and the function
name misleading.

In keeping with the other debug functions, rename it to
slab_destroy_debugcheck and drop the kernel doc.
Signed-off-by: default avatarRabin Vincent <rabin@rab.in>
Signed-off-by: default avatarPekka Enberg <penberg@cs.helsinki.fi>
parent 88e4ccf2
...@@ -1901,15 +1901,7 @@ static void check_poison_obj(struct kmem_cache *cachep, void *objp) ...@@ -1901,15 +1901,7 @@ static void check_poison_obj(struct kmem_cache *cachep, void *objp)
#endif #endif
#if DEBUG #if DEBUG
/** static void slab_destroy_debugcheck(struct kmem_cache *cachep, struct slab *slabp)
* slab_destroy_objs - destroy a slab and its objects
* @cachep: cache pointer being destroyed
* @slabp: slab pointer being destroyed
*
* Call the registered destructor for each object in a slab that is being
* destroyed.
*/
static void slab_destroy_objs(struct kmem_cache *cachep, struct slab *slabp)
{ {
int i; int i;
for (i = 0; i < cachep->num; i++) { for (i = 0; i < cachep->num; i++) {
...@@ -1938,7 +1930,7 @@ static void slab_destroy_objs(struct kmem_cache *cachep, struct slab *slabp) ...@@ -1938,7 +1930,7 @@ static void slab_destroy_objs(struct kmem_cache *cachep, struct slab *slabp)
} }
} }
#else #else
static void slab_destroy_objs(struct kmem_cache *cachep, struct slab *slabp) static void slab_destroy_debugcheck(struct kmem_cache *cachep, struct slab *slabp)
{ {
} }
#endif #endif
...@@ -1956,7 +1948,7 @@ static void slab_destroy(struct kmem_cache *cachep, struct slab *slabp) ...@@ -1956,7 +1948,7 @@ static void slab_destroy(struct kmem_cache *cachep, struct slab *slabp)
{ {
void *addr = slabp->s_mem - slabp->colouroff; void *addr = slabp->s_mem - slabp->colouroff;
slab_destroy_objs(cachep, slabp); slab_destroy_debugcheck(cachep, slabp);
if (unlikely(cachep->flags & SLAB_DESTROY_BY_RCU)) { if (unlikely(cachep->flags & SLAB_DESTROY_BY_RCU)) {
struct slab_rcu *slab_rcu; struct slab_rcu *slab_rcu;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment