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
This commit is contained in:
parent
2f393c15a6
commit
1645995b97
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=255097
@ -780,7 +780,7 @@ keg_drain(uma_keg_t keg)
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user