From owner-svn-src-all@freebsd.org Sat Oct 29 21:01:50 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EAAEDC26424; Sat, 29 Oct 2016 21:01:50 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A35C2202; Sat, 29 Oct 2016 21:01:50 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u9TL1n4A080354; Sat, 29 Oct 2016 21:01:49 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u9TL1nKP080353; Sat, 29 Oct 2016 21:01:49 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201610292101.u9TL1nKP080353@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Sat, 29 Oct 2016 21:01:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r308098 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Oct 2016 21:01:51 -0000 Author: alc Date: Sat Oct 29 21:01:49 2016 New Revision: 308098 URL: https://svnweb.freebsd.org/changeset/base/308098 Log: The "lookup_is_valid" field is used as a "bool". Make it one. Convert vm_fault_hold()'s Boolean variables that are only used internally to "bool". Add a comment describing why the one remaining "boolean_t" was not converted. Reviewed by: kib MFC after: 8 days Modified: head/sys/vm/vm_fault.c Modified: head/sys/vm/vm_fault.c ============================================================================== --- head/sys/vm/vm_fault.c Sat Oct 29 20:01:48 2016 (r308097) +++ head/sys/vm/vm_fault.c Sat Oct 29 21:01:49 2016 (r308098) @@ -122,7 +122,7 @@ struct faultstate { vm_pindex_t first_pindex; vm_map_t map; vm_map_entry_t entry; - int lookup_still_valid; + bool lookup_still_valid; struct vnode *vp; }; @@ -148,7 +148,7 @@ unlock_map(struct faultstate *fs) if (fs->lookup_still_valid) { vm_map_lookup_done(fs->map, fs->entry); - fs->lookup_still_valid = FALSE; + fs->lookup_still_valid = false; } } @@ -292,7 +292,6 @@ vm_fault_hold(vm_map_t map, vm_offset_t { vm_prot_t prot; int alloc_req, era, faultcount, nera, result; - boolean_t dead, growstack, is_first_object_locked, wired; int map_generation; vm_object_t next_object; struct faultstate fs; @@ -301,13 +300,14 @@ vm_fault_hold(vm_map_t map, vm_offset_t vm_page_t m; int ahead, behind, cluster_offset, error, locked, rv; u_char behavior; - bool hardfault; + boolean_t wired; /* Passed by reference. */ + bool dead, growstack, hardfault, is_first_object_locked; - growstack = TRUE; PCPU_INC(cnt.v_vm_faults); fs.vp = NULL; faultcount = 0; nera = -1; + growstack = true; hardfault = false; RetryFault:; @@ -325,7 +325,7 @@ RetryFault:; result = vm_map_growstack(curproc, vaddr); if (result != KERN_SUCCESS) return (KERN_FAILURE); - growstack = FALSE; + growstack = false; goto RetryFault; } unlock_vp(&fs); @@ -427,7 +427,7 @@ fast_failed: vm_object_reference_locked(fs.first_object); vm_object_pip_add(fs.first_object, 1); - fs.lookup_still_valid = TRUE; + fs.lookup_still_valid = true; fs.first_m = NULL; @@ -836,7 +836,7 @@ vnode_locked: * dirty in the first object so that it will go out * to swap when needed. */ - is_first_object_locked = FALSE; + is_first_object_locked = false; if ( /* * Only one shadow object @@ -941,7 +941,7 @@ vnode_locked: unlock_and_deallocate(&fs); goto RetryFault; } - fs.lookup_still_valid = TRUE; + fs.lookup_still_valid = true; if (fs.map->timestamp != map_generation) { result = vm_map_lookup_locked(&fs.map, vaddr, fault_type, &fs.entry, &retry_object, &retry_pindex, &retry_prot, &wired);