vm_object.c (0269ae4c19ad779b43b0d6e2416ac7386945d692) | vm_object.c (0fd977b3fa32d54b61554416363faae8a7bfaa2b) |
---|---|
1/*- 2 * SPDX-License-Identifier: (BSD-3-Clause AND MIT-CMU) 3 * 4 * Copyright (c) 1991, 1993 5 * The Regents of the University of California. All rights reserved. 6 * 7 * This code is derived from software contributed to Berkeley by 8 * The Mach Operating System project at Carnegie-Mellon University. --- 1581 unchanged lines hidden (view full) --- 1590 1591 /* 1592 * Page is out of the parent object's range, we can 1593 * simply destroy it. 1594 */ 1595 vm_page_lock(p); 1596 KASSERT(!pmap_page_is_mapped(p), 1597 ("freeing mapped page %p", p)); | 1/*- 2 * SPDX-License-Identifier: (BSD-3-Clause AND MIT-CMU) 3 * 4 * Copyright (c) 1991, 1993 5 * The Regents of the University of California. All rights reserved. 6 * 7 * This code is derived from software contributed to Berkeley by 8 * The Mach Operating System project at Carnegie-Mellon University. --- 1581 unchanged lines hidden (view full) --- 1590 1591 /* 1592 * Page is out of the parent object's range, we can 1593 * simply destroy it. 1594 */ 1595 vm_page_lock(p); 1596 KASSERT(!pmap_page_is_mapped(p), 1597 ("freeing mapped page %p", p)); |
1598 if (!vm_page_wired(p)) | 1598 if (vm_page_remove(p)) |
1599 vm_page_free(p); | 1599 vm_page_free(p); |
1600 else 1601 vm_page_remove(p); | |
1602 vm_page_unlock(p); 1603 continue; 1604 } 1605 1606 pp = vm_page_lookup(object, new_pindex); 1607 if (pp != NULL && vm_page_busied(pp)) { 1608 /* 1609 * The page in the parent is busy and possibly not --- 24 unchanged lines hidden (view full) --- 1634 * backing object. 1635 */ 1636 if (backing_object->type == OBJT_SWAP) 1637 swap_pager_freespace(backing_object, p->pindex, 1638 1); 1639 vm_page_lock(p); 1640 KASSERT(!pmap_page_is_mapped(p), 1641 ("freeing mapped page %p", p)); | 1600 vm_page_unlock(p); 1601 continue; 1602 } 1603 1604 pp = vm_page_lookup(object, new_pindex); 1605 if (pp != NULL && vm_page_busied(pp)) { 1606 /* 1607 * The page in the parent is busy and possibly not --- 24 unchanged lines hidden (view full) --- 1632 * backing object. 1633 */ 1634 if (backing_object->type == OBJT_SWAP) 1635 swap_pager_freespace(backing_object, p->pindex, 1636 1); 1637 vm_page_lock(p); 1638 KASSERT(!pmap_page_is_mapped(p), 1639 ("freeing mapped page %p", p)); |
1642 if (!vm_page_wired(p)) | 1640 if (vm_page_remove(p)) |
1643 vm_page_free(p); | 1641 vm_page_free(p); |
1644 else 1645 vm_page_remove(p); | |
1646 vm_page_unlock(p); 1647 continue; 1648 } 1649 1650 /* 1651 * Page does not exist in parent, rename the page from the 1652 * backing object to the main object. 1653 * --- 1038 unchanged lines hidden --- | 1642 vm_page_unlock(p); 1643 continue; 1644 } 1645 1646 /* 1647 * Page does not exist in parent, rename the page from the 1648 * backing object to the main object. 1649 * --- 1038 unchanged lines hidden --- |