Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Sep 2015 07:44:08 +0000 (UTC)
From:      Jeff Roberson <jeff@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r288144 - head/sys/kern
Message-ID:  <201509230744.t8N7i8hs007319@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jeff
Date: Wed Sep 23 07:44:07 2015
New Revision: 288144
URL: https://svnweb.freebsd.org/changeset/base/288144

Log:
   - Fix a nonsense reordering that somehow slipped into my last diff.
  
  Reported by:	pho

Modified:
  head/sys/kern/vfs_bio.c

Modified: head/sys/kern/vfs_bio.c
==============================================================================
--- head/sys/kern/vfs_bio.c	Wed Sep 23 05:39:20 2015	(r288143)
+++ head/sys/kern/vfs_bio.c	Wed Sep 23 07:44:07 2015	(r288144)
@@ -2090,6 +2090,8 @@ vfs_vmio_invalidate(struct buf *bp)
 		if (m == bogus_page)
 			panic("vfs_vmio_invalidate: Unexpected bogus page.");
 
+		presid = resid > (PAGE_SIZE - poffset) ?
+		    (PAGE_SIZE - poffset) : resid;
 		KASSERT(presid >= 0, ("brelse: extra page"));
 		while (vm_page_xbusied(m)) {
 			vm_page_lock(m);
@@ -2097,8 +2099,6 @@ vfs_vmio_invalidate(struct buf *bp)
 			vm_page_busy_sleep(m, "mbncsh");
 			VM_OBJECT_WLOCK(obj);
 		}
-		presid = resid > (PAGE_SIZE - poffset) ?
-		    (PAGE_SIZE - poffset) : resid;
 		if (pmap_page_wired_mappings(m) == 0)
 			vm_page_set_invalid(m, poffset, presid);
 		resid -= presid;



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