Skip to content

Commit

Permalink
idr: fix idr_remove()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Nadia Derbey authored and torvalds committed May 1, 2008
1 parent 7793bfc commit af8e2a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/idr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit af8e2a4

Please sign in to comment.