1IDR_DESTROY(9) Basic Kernel Library Functions IDR_DESTROY(9)
2
3
4
6 idr_destroy - release all cached layers within an idr tree
7
9 void idr_destroy(struct idr * idp);
10
12 idp
13 idr handle
14
16 Free all id mappings and all idp_layers. After this function, idp is
17 completely unused and can be freed / recycled. The caller is
18 responsible for ensuring that no one else accesses idp during or after
19 idr_destroy.
20
21 A typical clean-up sequence for objects stored in an idr tree will use
22 idr_for_each to free all objects, if necessay, then idr_destroy to free
23 up the id mappings and cached idr_layers.
24
26Kernel Hackers Manual 3.10 June 2019 IDR_DESTROY(9)