summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorNadia Derbey <Nadia.Derbey@bull.net>2008-05-01 13:34:57 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2008-05-01 17:04:00 +0200
commitaf8e2a4cb9b3e14b919ae1cd4012825aefddbeb0 (patch)
tree8910da8632172a09437db0bb5860234daefd894f /lib
parentPNP: fix printk format warnings (diff)
downloadlinux-af8e2a4cb9b3e14b919ae1cd4012825aefddbeb0.tar.xz
linux-af8e2a4cb9b3e14b919ae1cd4012825aefddbeb0.zip
idr: fix idr_remove()
The return inside the loop makes us free only a single layer. Signed-off-by: Nadia Derbey <Nadia.Derbey@bull.net> Cc: "Paul E. McKenney" <paulmck@us.ibm.com> Cc: Manfred Spraul <manfred@colorfullife.com> Cc: Jim Houston <jim.houston@comcast.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/idr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/idr.c b/lib/idr.c
index 8368c81fcb7d..7a02e173f027 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);