diff options
author | Kyle McMartin <kyle@parisc-linux.org> | 2005-10-26 23:28:40 -0400 |
---|---|---|
committer | Kyle McMartin <kyle@parisc-linux.org> | 2005-10-26 23:28:40 -0400 |
commit | e0f998930eb67c49f2862c58a45262ad0bc03eca (patch) | |
tree | d2bc6cbe11a00a05f96da01b1d4ac27adaabd546 /lib/idr.c | |
parent | 6958ae318bb1af5e0b77968384700fb184fb8893 (diff) | |
parent | 7a4ed937aa44acdeb8c6ba671509dc7b54b09d3a (diff) | |
download | op-kernel-dev-e0f998930eb67c49f2862c58a45262ad0bc03eca.zip op-kernel-dev-e0f998930eb67c49f2862c58a45262ad0bc03eca.tar.gz |
Auto-update from upstream
Diffstat (limited to 'lib/idr.c')
-rw-r--r-- | lib/idr.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -346,6 +346,19 @@ void idr_remove(struct idr *idp, int id) EXPORT_SYMBOL(idr_remove); /** + * idr_destroy - release all cached layers within an idr tree + * idp: idr handle + */ +void idr_destroy(struct idr *idp) +{ + while (idp->id_free_cnt) { + struct idr_layer *p = alloc_layer(idp); + kmem_cache_free(idr_layer_cache, p); + } +} +EXPORT_SYMBOL(idr_destroy); + +/** * idr_find - return pointer for given id * @idp: idr handle * @id: lookup key |