From owner-svn-src-all@freebsd.org Sat Jul 22 03:54:05 2017 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 72414C7E7AC; Sat, 22 Jul 2017 03:54:05 +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 3F41C6A629; Sat, 22 Jul 2017 03:54:05 +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 v6M3s4MM091859; Sat, 22 Jul 2017 03:54:04 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6M3s4Rx091858; Sat, 22 Jul 2017 03:54:04 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201707220354.v6M3s4Rx091858@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Sat, 22 Jul 2017 03:54:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321357 - stable/11/sys/kern X-SVN-Group: stable-11 X-SVN-Commit-Author: alc X-SVN-Commit-Paths: stable/11/sys/kern X-SVN-Commit-Revision: 321357 X-SVN-Commit-Repository: base 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, 22 Jul 2017 03:54:05 -0000 Author: alc Date: Sat Jul 22 03:54:04 2017 New Revision: 321357 URL: https://svnweb.freebsd.org/changeset/base/321357 Log: MFC r315597 Style fixes. In particular, the variable "bogus" is used like a Boolean. Define it as such. Modified: stable/11/sys/kern/vfs_bio.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/vfs_bio.c ============================================================================== --- stable/11/sys/kern/vfs_bio.c Fri Jul 21 23:53:48 2017 (r321356) +++ stable/11/sys/kern/vfs_bio.c Sat Jul 22 03:54:04 2017 (r321357) @@ -2531,7 +2531,8 @@ vfs_vmio_iodone(struct buf *bp) vm_page_t m; vm_object_t obj; struct vnode *vp; - int bogus, i, iosize; + int i, iosize, resid; + bool bogus; obj = bp->b_bufobj->bo_object; KASSERT(obj->paging_in_progress >= bp->b_npages, @@ -2548,12 +2549,10 @@ vfs_vmio_iodone(struct buf *bp) KASSERT(bp->b_offset != NOOFFSET, ("vfs_vmio_iodone: bp %p has no buffer offset", bp)); - bogus = 0; + bogus = false; iosize = bp->b_bcount - bp->b_resid; VM_OBJECT_WLOCK(obj); for (i = 0; i < bp->b_npages; i++) { - int resid; - resid = ((foff + PAGE_SIZE) & ~(off_t)PAGE_MASK) - foff; if (resid > iosize) resid = iosize; @@ -2563,7 +2562,7 @@ vfs_vmio_iodone(struct buf *bp) */ m = bp->b_pages[i]; if (m == bogus_page) { - bogus = 1; + bogus = true; m = vm_page_lookup(obj, OFF_TO_IDX(foff)); if (m == NULL) panic("biodone: page disappeared!"); @@ -4265,10 +4264,11 @@ vfs_drain_busy_pages(struct buf *bp) void vfs_busy_pages(struct buf *bp, int clear_modify) { - int i, bogus; vm_object_t obj; vm_ooffset_t foff; vm_page_t m; + int i; + bool bogus; if (!(bp->b_flags & B_VMIO)) return; @@ -4281,7 +4281,7 @@ vfs_busy_pages(struct buf *bp, int clear_modify) vfs_drain_busy_pages(bp); if (bp->b_bufsize != 0) vfs_setdirty_locked_object(bp); - bogus = 0; + bogus = false; for (i = 0; i < bp->b_npages; i++) { m = bp->b_pages[i]; @@ -4310,7 +4310,7 @@ vfs_busy_pages(struct buf *bp, int clear_modify) } else if (m->valid == VM_PAGE_BITS_ALL && (bp->b_flags & B_CACHE) == 0) { bp->b_pages[i] = bogus_page; - bogus++; + bogus = true; } foff = (foff + PAGE_SIZE) & ~(off_t)PAGE_MASK; }