From: Nadia Derbey Date: Thu, 1 May 2008 11:34:57 +0000 (-0700) Subject: idr: fix idr_remove() X-Git-Tag: v2.6.26-rc1~64 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=af8e2a4cb9b3e14b919ae1cd4012825aefddbeb0;p=linux-2.6 idr: fix idr_remove() The return inside the loop makes us free only a single layer. Signed-off-by: Nadia Derbey Cc: "Paul E. McKenney" Cc: Manfred Spraul Cc: Jim Houston Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/lib/idr.c b/lib/idr.c index 8368c81fcb..7a02e173f0 100644 --- a/lib/idr.c +++ b/lib/idr.c @@ -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);