diff options
author | Nadia Derbey <Nadia.Derbey@bull.net> | 2008-05-01 07:34:57 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-05-01 11:04:00 -0400 |
commit | af8e2a4cb9b3e14b919ae1cd4012825aefddbeb0 (patch) | |
tree | 8910da8632172a09437db0bb5860234daefd894f /lib/idr.c | |
parent | 7793bfcfccc91d036d61618d90baf2be3d76e710 (diff) |
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/idr.c')
-rw-r--r-- | lib/idr.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -385,8 +385,8 @@ void idr_remove(struct idr *idp, int id) | |||
385 | while (idp->id_free_cnt >= IDR_FREE_MAX) { | 385 | while (idp->id_free_cnt >= IDR_FREE_MAX) { |
386 | p = alloc_layer(idp); | 386 | p = alloc_layer(idp); |
387 | kmem_cache_free(idr_layer_cache, p); | 387 | kmem_cache_free(idr_layer_cache, p); |
388 | return; | ||
389 | } | 388 | } |
389 | return; | ||
390 | } | 390 | } |
391 | EXPORT_SYMBOL(idr_remove); | 391 | EXPORT_SYMBOL(idr_remove); |
392 | 392 | ||