All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] slab: rename slab_destroy_objs
@ 2008-07-03 19:10 Rabin Vincent
  2008-07-03 19:38 ` Pekka Enberg
  0 siblings, 1 reply; 2+ messages in thread
From: Rabin Vincent @ 2008-07-03 19:10 UTC (permalink / raw)
  To: lkml; +Cc: Pekka Enberg, Christoph Lameter

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: Rabin Vincent <rabin@rab.in>
---
 mm/slab.c |   14 +++-----------
 1 files changed, 3 insertions(+), 11 deletions(-)

diff --git a/mm/slab.c b/mm/slab.c
index 046607f..b4aa4c8 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -1901,15 +1901,7 @@ static void check_poison_obj(struct kmem_cache *cachep, void *objp)
 #endif
 
 #if DEBUG
-/**
- * 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)
+static void slab_destroy_debugcheck(struct kmem_cache *cachep, struct slab *slabp)
 {
 	int i;
 	for (i = 0; i < cachep->num; i++) {
@@ -1938,7 +1930,7 @@ static void slab_destroy_objs(struct kmem_cache *cachep, struct slab *slabp)
 	}
 }
 #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
@@ -1956,7 +1948,7 @@ static void slab_destroy(struct kmem_cache *cachep, struct slab *slabp)
 {
 	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)) {
 		struct slab_rcu *slab_rcu;
 
-- 
1.5.6


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] slab: rename slab_destroy_objs
  2008-07-03 19:10 [PATCH] slab: rename slab_destroy_objs Rabin Vincent
@ 2008-07-03 19:38 ` Pekka Enberg
  0 siblings, 0 replies; 2+ messages in thread
From: Pekka Enberg @ 2008-07-03 19:38 UTC (permalink / raw)
  To: Rabin Vincent; +Cc: lkml, Christoph Lameter

Hi Rabin,

On Thu, Jul 3, 2008 at 10:10 PM, Rabin Vincent <rabin@rab.in> wrote:
> 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: Rabin Vincent <rabin@rab.in>

Applied, thanks!

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-07-03 19:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-03 19:10 [PATCH] slab: rename slab_destroy_objs Rabin Vincent
2008-07-03 19:38 ` Pekka Enberg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.