riscv: remove a redundant check on PGA_WRITEABLE

This is achieved by the preceding call to pmap_page_is_write_mapped().
It appears the second check and comment were left mistakenly when the
intent was to remove them.

Reviewed by:	mhorne
MFC after:	1 week
Fixes:	638f867814 ("(6/6) Convert pmap to expect busy in write... ")
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1304
This commit is contained in:
wy-chung 2024-06-26 15:46:32 +08:00 committed by Mitchell Horne
parent d3bb35d4e5
commit 2eb64df7f5

View file

@ -4611,19 +4611,12 @@ pmap_clear_modify(vm_page_t m)
int md_gen, pvh_gen;
KASSERT((m->oflags & VPO_UNMANAGED) == 0,
("pmap_clear_modify: page %p is not managed", m));
("%s: page %p is not managed", __func__, m));
vm_page_assert_busied(m);
if (!pmap_page_is_write_mapped(m))
return;
/*
* If the page is not PGA_WRITEABLE, then no PTEs can have PG_M set.
* If the object containing the page is locked and the page is not
* exclusive busied, then PGA_WRITEABLE cannot be concurrently set.
*/
if ((m->a.flags & PGA_WRITEABLE) == 0)
return;
pvh = (m->flags & PG_FICTITIOUS) != 0 ? &pv_dummy :
pa_to_pvh(VM_PAGE_TO_PHYS(m));
lock = VM_PAGE_TO_PV_LIST_LOCK(m);