diff options
-rw-r--r-- | lib/idr.c | 16 |
1 files changed, 0 insertions, 16 deletions
@@ -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 | } |
598 | EXPORT_SYMBOL(idr_remove); | 582 | EXPORT_SYMBOL(idr_remove); |
599 | 583 | ||