aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/idr.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/lib/idr.c b/lib/idr.c
index e79e051bddc1..9ed37a7a031d 100644
--- a/lib/idr.c
+++ b/lib/idr.c
@@ -18,12 +18,6 @@
18 * pointer or what ever, we treat it as a (void *). You can pass this 18 * pointer or what ever, we treat it as a (void *). You can pass this
19 * id to a user for him to pass back at a later time. You then pass 19 * id to a user for him to pass back at a later time. You then pass
20 * that id to this code and it returns your pointer. 20 * that id to this code and it returns your pointer.
21
22 * You can release ids at any time. When all ids are released, most of
23 * the memory is returned (we keep MAX_IDR_FREE) in a local pool so we
24 * don't need to go to the memory "store" during an id allocate, just
25 * so you don't need to be too concerned about locking and conflicts
26 * with the slab allocator.
27 */ 21 */
28 22
29#ifndef TEST // to test in user space... 23#ifndef TEST // to test in user space...
@@ -584,16 +578,6 @@ void idr_remove(struct idr *idp, int id)
584 bitmap_clear(to_free->bitmap, 0, IDR_SIZE); 578 bitmap_clear(to_free->bitmap, 0, IDR_SIZE);
585 free_layer(idp, to_free); 579 free_layer(idp, to_free);
586 } 580 }
587 while (idp->id_free_cnt >= MAX_IDR_FREE) {
588 p = get_from_free_list(idp);
589 /*
590 * Note: we don't call the rcu callback here, since the only
591 * layers that fall into the freelist are those that have been
592 * preallocated.
593 */
594 kmem_cache_free(idr_layer_cache, p);
595 }
596 return;
597} 581}
598EXPORT_SYMBOL(idr_remove); 582EXPORT_SYMBOL(idr_remove);
599 583