diff options
author | hselasky <hselasky@FreeBSD.org> | 2015-01-13 17:07:30 +0000 |
---|---|---|
committer | hselasky <hselasky@FreeBSD.org> | 2015-01-13 17:07:30 +0000 |
commit | 5c6e5d81e996b18847b942e50e5544b5cafebe50 (patch) | |
tree | 4dce4d994559ed6b5be2cab4248c6dc19f344a39 /sys/ofed/include/linux/linux_idr.c | |
parent | ca95da9368ea3ead4c53f70a6a8a812b7f38ffde (diff) | |
download | FreeBSD-src-5c6e5d81e996b18847b942e50e5544b5cafebe50.zip FreeBSD-src-5c6e5d81e996b18847b942e50e5544b5cafebe50.tar.gz |
MFC r276749:
Fixes and updates for the Linux compatibility layer:
- Remove unsupported "bus" field from "struct pci_dev".
- Fix logic inside "pci_enable_msix()" when the number of allocated
interrupts are less than the number of available interrupts.
- Update header files included from "list.h".
- Ensure that "idr_destroy()" removes all entries before destroying
the IDR root node(s).
- Set the "device->release" function so that we don't leak memory at
device destruction.
- Use FreeBSD's "log()" function for certain debug printouts.
- Put parenthesis around arguments inside the min, max, min_t and max_t macros.
- Make sure we don't leak file descriptors by dropping the extra file
reference counts done by the FreeBSD kernel when calling falloc()
and fget_unlocked().
MFC after: 1 week
Sponsored by: Mellanox Technologies
Diffstat (limited to 'sys/ofed/include/linux/linux_idr.c')
-rw-r--r-- | sys/ofed/include/linux/linux_idr.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/ofed/include/linux/linux_idr.c b/sys/ofed/include/linux/linux_idr.c index 0238c8e..273f2ea 100644 --- a/sys/ofed/include/linux/linux_idr.c +++ b/sys/ofed/include/linux/linux_idr.c @@ -77,6 +77,7 @@ idr_destroy(struct idr *idr) { struct idr_layer *il, *iln; + idr_remove_all(idr); mtx_lock(&idr->lock); for (il = idr->free; il != NULL; il = iln) { iln = il->ary[0]; |