svn commit: r308096 - head/sys/vm

Alan Cox alc at FreeBSD.org
Sat Oct 29 19:22:39 UTC 2016


Author: alc
Date: Sat Oct 29 19:22:38 2016
New Revision: 308096
URL: https://svnweb.freebsd.org/changeset/base/308096

Log:
  With one exception, "hardfault" is used like a "bool".  Change that
  exception and make it a "bool".
  
  Reviewed by:	kib
  MFC after:	7 days

Modified:
  head/sys/vm/vm_fault.c

Modified: head/sys/vm/vm_fault.c
==============================================================================
--- head/sys/vm/vm_fault.c	Sat Oct 29 18:47:28 2016	(r308095)
+++ head/sys/vm/vm_fault.c	Sat Oct 29 19:22:38 2016	(r308096)
@@ -295,20 +295,20 @@ vm_fault_hold(vm_map_t map, vm_offset_t 
 	boolean_t dead, growstack, is_first_object_locked, wired;
 	int map_generation;
 	vm_object_t next_object;
-	int hardfault;
 	struct faultstate fs;
 	struct vnode *vp;
 	vm_offset_t e_end, e_start;
 	vm_page_t m;
 	int ahead, behind, cluster_offset, error, locked, rv;
 	u_char behavior;
+	bool hardfault;
 
-	hardfault = 0;
 	growstack = TRUE;
 	PCPU_INC(cnt.v_vm_faults);
 	fs.vp = NULL;
 	faultcount = 0;
 	nera = -1;
+	hardfault = false;
 
 RetryFault:;
 
@@ -708,7 +708,7 @@ vnode_locked:
 			    &behind, &ahead);
 			if (rv == VM_PAGER_OK) {
 				faultcount = behind + 1 + ahead;
-				hardfault++;
+				hardfault = true;
 				break; /* break to PAGE HAS BEEN FOUND */
 			}
 			if (rv == VM_PAGER_ERROR)


More information about the svn-src-all mailing list