- /*
- * If vm_fault_wire fails for any page we need to
- * undo what has been done. We decrement the wiring
- * count for those pages which have not yet been
- * wired (now) and unwire those that have (later).
- *
- * XXX this violates the locking protocol on the map,
- * needs to be fixed.
- */
- if (rv)
- entry->wired_count--;
- else if (entry->wired_count == 1) {
- rv = vm_fault_wire(map, entry->start, entry->end);
- if (rv) {
- failed = entry->start;
- entry->wired_count--;
- }
+ if (entry->wired_count == 1) {
+ vm_fault_wire(map, entry->start, entry->end);