Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 29 Oct 2016 19:22:38 +0000 (UTC)
From:      Alan Cox <alc@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r308096 - head/sys/vm
Message-ID:  <201610291922.u9TJMcDA043311@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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)



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