linux_idr.c (271127) | linux_idr.c (277139) |
---|---|
1/*- 2 * Copyright (c) 2010 Isilon Systems, Inc. 3 * Copyright (c) 2010 iX Systems, Inc. 4 * Copyright (c) 2010 Panasas, Inc. 5 * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 63 unchanged lines hidden (view full) --- 72} 73 74/* Only frees cached pages. */ 75void 76idr_destroy(struct idr *idr) 77{ 78 struct idr_layer *il, *iln; 79 | 1/*- 2 * Copyright (c) 2010 Isilon Systems, Inc. 3 * Copyright (c) 2010 iX Systems, Inc. 4 * Copyright (c) 2010 Panasas, Inc. 5 * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 63 unchanged lines hidden (view full) --- 72} 73 74/* Only frees cached pages. */ 75void 76idr_destroy(struct idr *idr) 77{ 78 struct idr_layer *il, *iln; 79 |
80 idr_remove_all(idr); |
|
80 mtx_lock(&idr->lock); 81 for (il = idr->free; il != NULL; il = iln) { 82 iln = il->ary[0]; 83 free(il, M_IDR); 84 } 85 mtx_unlock(&idr->lock); 86} 87 --- 361 unchanged lines hidden --- | 81 mtx_lock(&idr->lock); 82 for (il = idr->free; il != NULL; il = iln) { 83 iln = il->ary[0]; 84 free(il, M_IDR); 85 } 86 mtx_unlock(&idr->lock); 87} 88 --- 361 unchanged lines hidden --- |