mirror of
https://git.FreeBSD.org/src.git
synced 2024-11-30 08:19:09 +00:00
Make UMA set the overloaded page->object back to kmem_object for
UMA_ZONE_REFCNT and UMA_ZONE_MALLOC zones, as the page(s) undoubtedly came from kmem_map for those two. Previously it would set it back to NULL for UMA_ZONE_REFCNT zones and although this was probably not fatal, it added MORE code for no reason.
This commit is contained in:
parent
513c5292f8
commit
500f29d06e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=141983
@ -754,15 +754,9 @@ zone_drain(uma_zone_t zone)
|
||||
|
||||
if ((keg->uk_flags & UMA_ZONE_MALLOC) ||
|
||||
(keg->uk_flags & UMA_ZONE_REFCNT)) {
|
||||
vm_object_t obj;
|
||||
|
||||
if (flags & UMA_SLAB_KMEM)
|
||||
obj = kmem_object;
|
||||
else
|
||||
obj = NULL;
|
||||
for (i = 0; i < keg->uk_ppera; i++)
|
||||
vsetobj((vm_offset_t)mem + (i * PAGE_SIZE),
|
||||
obj);
|
||||
kmem_object);
|
||||
}
|
||||
if (keg->uk_flags & UMA_ZONE_OFFPAGE)
|
||||
uma_zfree_internal(keg->uk_slabzone, slab, NULL,
|
||||
@ -875,7 +869,7 @@ slab_zalloc(uma_zone_t zone, int wait)
|
||||
(keg->uk_flags & UMA_ZONE_REFCNT))
|
||||
for (i = 0; i < keg->uk_ppera; i++)
|
||||
vsetobj((vm_offset_t)mem +
|
||||
(i * PAGE_SIZE), NULL);
|
||||
(i * PAGE_SIZE), kmem_object);
|
||||
if (keg->uk_flags & UMA_ZONE_OFFPAGE)
|
||||
uma_zfree_internal(keg->uk_slabzone, slab,
|
||||
NULL, SKIP_NONE);
|
||||
|
Loading…
Reference in New Issue
Block a user