idr: fix idr_remove()

The return inside the loop makes us free only a single layer.

Signed-off-by: Nadia Derbey <[email protected]>
Cc: "Paul E. McKenney" <[email protected]>
Cc: Manfred Spraul <[email protected]>
Cc: Jim Houston <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
Nadia Derbey 2008-05-01 04:34:57 -07:00 • committed by Linus Torvalds
commit af8e2a4cb9

View file

@ -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);