Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Jul 2019 22:41:55 +0000 (UTC)
From:      Doug Moore <dougm@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r349713 - head/sys/vm
Message-ID:  <201907032241.x63MftaM069722@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dougm
Date: Wed Jul  3 22:41:54 2019
New Revision: 349713
URL: https://svnweb.freebsd.org/changeset/base/349713

Log:
  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

Modified:
  head/sys/vm/vm_map.c

Modified: head/sys/vm/vm_map.c
==============================================================================
--- head/sys/vm/vm_map.c	Wed Jul  3 21:30:18 2019	(r349712)
+++ head/sys/vm/vm_map.c	Wed Jul  3 22:41:54 2019	(r349713)
@@ -3170,9 +3170,7 @@ vm_map_wire_locked(vm_map_t map, vm_offset_t start, vm
 				rv = KERN_INVALID_ADDRESS;
 				goto done;
 			}
-			goto next_entry;
-		}
-		if (entry->wired_count == 0) {
+		} else if (entry->wired_count == 0) {
 			entry->wired_count++;
 
 			npages = atop(entry->end - entry->start);
@@ -3250,7 +3248,6 @@ vm_map_wire_locked(vm_map_t map, vm_offset_t start, vm
 		 * Check the map for holes in the specified region.
 		 * If VM_MAP_WIRE_HOLESOK was specified, skip this check.
 		 */
-	next_entry:
 		if ((flags & VM_MAP_WIRE_HOLESOK) == 0 &&
 		    entry->end < end && entry->next->start > entry->end) {
 			end = entry->end;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201907032241.x63MftaM069722>