Correct an error in r349122. pmap_unwire() should update the pmap's wired

count, not its resident count.

X-MFC with:	r349122
This commit is contained in:
Alan Cox 2019-06-19 03:33:00 +00:00
parent 46dea205c6
commit 0b3c5f1bc9
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=349183

View File

@ -3777,8 +3777,8 @@ pmap_unwire(pmap_t pmap, vm_offset_t sva, vm_offset_t eva)
*/
if (sva + L2_SIZE == va_next && eva >= va_next) {
atomic_clear_64(l2, ATTR_SW_WIRED);
pmap_resident_count_dec(pmap, L2_SIZE /
PAGE_SIZE);
pmap->pm_stats.wired_count -= L2_SIZE /
PAGE_SIZE;
continue;
} else if (pmap_demote_l2(pmap, l2, sva) == NULL)
panic("pmap_unwire: demotion failed");