summaryrefslogtreecommitdiffstats
path: root/sys/vm/uma_core.c
diff options
context:
space:
mode:
authormckusick <mckusick@FreeBSD.org>2013-08-31 15:40:15 +0000
committermckusick <mckusick@FreeBSD.org>2013-08-31 15:40:15 +0000
commit57ee6d3c5d7810dc69862869c1b7055eac730532 (patch)
treec38b3bd01e8ebc63d1458b902bd7eaa6a3263505 /sys/vm/uma_core.c
parent6c258edb19ac9bc6e26715b6c722c13d69880bc8 (diff)
downloadFreeBSD-src-57ee6d3c5d7810dc69862869c1b7055eac730532.zip
FreeBSD-src-57ee6d3c5d7810dc69862869c1b7055eac730532.tar.gz
Fix bug introduced in rewrite of keg_free_slab in -r251894.
The consequence of the bug is that fini calls are not done when a slab is freed by a call-back from the page daemon. It went unnoticed for two months because fini is little used. I spotted the bug while reading the code to learn how it works so I could write it up for the next edition of the Design and Implementation of FreeBSD book. No MFC needed as this code exists only in HEAD. Reviewed by: kib, jeff Tested by: pho
Diffstat (limited to 'sys/vm/uma_core.c')
-rw-r--r--sys/vm/uma_core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/vm/uma_core.c b/sys/vm/uma_core.c
index 6627a07..e39654e 100644
--- a/sys/vm/uma_core.c
+++ b/sys/vm/uma_core.c
@@ -780,7 +780,7 @@ finished:
while ((slab = SLIST_FIRST(&freeslabs)) != NULL) {
SLIST_REMOVE(&freeslabs, slab, uma_slab, us_hlink);
- keg_free_slab(keg, slab, 0);
+ keg_free_slab(keg, slab, keg->uk_ipers);
}
}
OpenPOWER on IntegriCloud