Deleted Added
full compact
66c66
< __FBSDID("$FreeBSD: head/sys/vm/vm_object.c 254138 2013-08-09 11:11:11Z attilio $");
---
> __FBSDID("$FreeBSD: head/sys/vm/vm_object.c 254141 2013-08-09 11:28:55Z attilio $");
203a204
> object->rtree.rt_flags = 0;
207a209
> object->cache.rt_flags = 0;
1353a1356,1365
>
> /* vm_page_rename() will handle dirty and cache. */
> if (vm_page_rename(m, new_object, idx)) {
> VM_OBJECT_WUNLOCK(new_object);
> VM_OBJECT_WUNLOCK(orig_object);
> VM_WAIT;
> VM_OBJECT_WLOCK(orig_object);
> VM_OBJECT_WLOCK(new_object);
> goto retry;
> }
1369,1372d1380
< vm_page_lock(m);
< vm_page_rename(m, new_object, idx);
< vm_page_unlock(m);
< /* page automatically made dirty by rename and cache handled */
1528,1538d1535
< /*
< * Destroy any associated swap
< */
< if (backing_object->type == OBJT_SWAP) {
< swap_pager_freespace(
< backing_object,
< p->pindex,
< 1
< );
< }
<
1542a1540,1543
> if (backing_object->type == OBJT_SWAP)
> swap_pager_freespace(backing_object,
> p->pindex, 1);
>
1563a1565,1568
> if (backing_object->type == OBJT_SWAP)
> swap_pager_freespace(backing_object,
> p->pindex, 1);
>
1581a1587,1590
> if (backing_object->type == OBJT_SWAP)
> swap_pager_freespace(backing_object,
> p->pindex, 1);
>
1601d1609
< #if VM_NRESERVLEVEL > 0
1603,1609d1610
< * Rename the reservation.
< */
< vm_reserv_rename(p, object, backing_object,
< backing_offset_index);
< #endif
<
< /*
1614a1616
> * vm_page_rename() will handle dirty and cache.
1616,1619c1618,1641
< vm_page_lock(p);
< vm_page_rename(p, object, new_pindex);
< vm_page_unlock(p);
< /* page automatically made dirty by rename */
---
> if (vm_page_rename(p, object, new_pindex)) {
> if (op & OBSC_COLLAPSE_NOWAIT) {
> p = next;
> continue;
> }
> VM_OBJECT_WLOCK(backing_object);
> VM_OBJECT_WUNLOCK(object);
> VM_WAIT;
> VM_OBJECT_WLOCK(object);
> VM_OBJECT_WLOCK(backing_object);
> p = TAILQ_FIRST(&backing_object->memq);
> continue;
> }
> if (backing_object->type == OBJT_SWAP)
> swap_pager_freespace(backing_object, p->pindex,
> 1);
>
> #if VM_NRESERVLEVEL > 0
> /*
> * Rename the reservation.
> */
> vm_reserv_rename(p, object, backing_object,
> backing_offset_index);
> #endif