Ooops m->md.pvh_attrs can't be used to know if the page is writeable, because

it only remembers if the page is modified or referenced.

Bad review from:	cognet
This commit is contained in:
cognet 2006-08-28 21:43:34 +00:00
parent fa893a6f9c
commit ecf44c474e

View File

@ -4469,11 +4469,8 @@ void
pmap_remove_write(vm_page_t m)
{
if (m->md.pvh_attrs & PVF_WRITE)
if (m->flags & PG_WRITEABLE)
pmap_clearbit(m, PVF_WRITE);
else
KASSERT((m->flags & PG_WRITEABLE) == 0,
("pmap_clear_write: page %p has PG_WRITEABLE set", m));
}