From 1645995b97556167978a9ca5733d37ecf6e19cdc Mon Sep 17 00:00:00 2001 From: Kirk McKusick Date: Sat, 31 Aug 2013 15:40:15 +0000 Subject: [PATCH] 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 --- sys/vm/uma_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/vm/uma_core.c b/sys/vm/uma_core.c index 6627a07b60ef..e39654ea0678 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); } }