when destroying a pmap, unlock it before freeing it to keep LOCKDEBUG happy.
This commit is contained in:
parent
81a1ade358
commit
1edbaac92c
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pmap.new.c,v 1.20 1998/10/11 23:21:00 chuck Exp $ */
|
||||
/* $NetBSD: pmap.new.c,v 1.21 1999/03/17 01:34:04 chs Exp $ */
|
||||
|
||||
/*
|
||||
*
|
||||
@ -1805,13 +1805,14 @@ void pmap_destroy(pmap)
|
||||
struct pmap *pmap;
|
||||
|
||||
{
|
||||
int refs;
|
||||
/*
|
||||
* drop reference count
|
||||
*/
|
||||
simple_lock(&pmap->pm_obj.vmobjlock);
|
||||
pmap->pm_obj.uo_refs--;
|
||||
if (pmap->pm_obj.uo_refs > 0) {
|
||||
simple_unlock(&pmap->pm_obj.vmobjlock);
|
||||
refs = --pmap->pm_obj.uo_refs;
|
||||
simple_unlock(&pmap->pm_obj.vmobjlock);
|
||||
if (refs > 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user