mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-20 08:44:33 +00:00
Eliminate a goto and a label in vm_map_wire_locked by inserting an 'else'.
Reviewed by: alc Approved by: kib, markj (mentors, implicit) Differential Revision: https://reviews.freebsd.org/D20845
This commit is contained in:
parent
dda0c86204
commit
38e220e8df
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=349713
|
@ -3170,9 +3170,7 @@ vm_map_wire_locked(vm_map_t map, vm_offset_t start, vm_offset_t end, int flags)
|
||||||
rv = KERN_INVALID_ADDRESS;
|
rv = KERN_INVALID_ADDRESS;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
goto next_entry;
|
} else if (entry->wired_count == 0) {
|
||||||
}
|
|
||||||
if (entry->wired_count == 0) {
|
|
||||||
entry->wired_count++;
|
entry->wired_count++;
|
||||||
|
|
||||||
npages = atop(entry->end - entry->start);
|
npages = atop(entry->end - entry->start);
|
||||||
|
@ -3250,7 +3248,6 @@ vm_map_wire_locked(vm_map_t map, vm_offset_t start, vm_offset_t end, int flags)
|
||||||
* Check the map for holes in the specified region.
|
* Check the map for holes in the specified region.
|
||||||
* If VM_MAP_WIRE_HOLESOK was specified, skip this check.
|
* If VM_MAP_WIRE_HOLESOK was specified, skip this check.
|
||||||
*/
|
*/
|
||||||
next_entry:
|
|
||||||
if ((flags & VM_MAP_WIRE_HOLESOK) == 0 &&
|
if ((flags & VM_MAP_WIRE_HOLESOK) == 0 &&
|
||||||
entry->end < end && entry->next->start > entry->end) {
|
entry->end < end && entry->next->start > entry->end) {
|
||||||
end = entry->end;
|
end = entry->end;
|
||||||
|
|
Loading…
Reference in a new issue