From af8e2a4cb9b3e14b919ae1cd4012825aefddbeb0 Mon Sep 17 00:00:00 2001 From: Nadia Derbey Date: Thu, 1 May 2008 04:34:57 -0700 Subject: [PATCH] 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 --- lib/idr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/idr.c b/lib/idr.c index 8368c81fcb7..7a02e173f02 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); -- 2.20.1