lkml.org 
[lkml]   [2008]   [Apr]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 01/10] Fix idr_remove()
[PATCH 01/10]

This patch fixes idr_remove(): the return inside the loop makes us free only
a single layer.

Signed-off-by: Nadia Derbey <Nadia.Derbey@bull.net>

---
lib/idr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6.25-mm1/lib/idr.c
===================================================================
--- linux-2.6.25-mm1.orig/lib/idr.c 2008-04-25 15:29:00.000000000 +0200
+++ linux-2.6.25-mm1/lib/idr.c 2008-04-25 15:48:34.000000000 +0200
@@ -385,8 +385,8 @@ void idr_remove(struct idr *idp, int id)
while (idp->id_free_cnt >= IDR_FREE_MAX) {
p = alloc_layer(idp);
kmem_cache_free(idr_layer_cache, p);
- return;
}
+ return;
}
EXPORT_SYMBOL(idr_remove);

--


\
 
 \ /
  Last update: 2008-04-29 16:43    [W:0.376 / U:0.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site