Fix an error case in vm_map_wire(): unwiring of an entry during cleanup

after a user wire error fails when the entry is already system wired.

Reported by:	tegge
This commit is contained in:
Alan Cox 2002-11-09 21:26:49 +00:00
parent 2be7d43928
commit f6116791a2

View File

@ -1782,8 +1782,8 @@ vm_map_wire(vm_map_t map, vm_offset_t start, vm_offset_t end,
*/
entry->wired_count = 0;
} else {
if (!user_wire || (entry->wired_count == 1 &&
(entry->eflags & MAP_ENTRY_USER_WIRED) == 0))
if (!user_wire ||
(entry->eflags & MAP_ENTRY_USER_WIRED) == 0)
entry->wired_count--;
if (entry->wired_count == 0) {
/*