]> xenbits.xensource.com Git - people/julieng/freebsd.git/commitdiff
- Fix a nonsense reordering that somehow slipped into my last diff.
authorjeff <jeff@FreeBSD.org>
Wed, 23 Sep 2015 07:44:07 +0000 (07:44 +0000)
committerjeff <jeff@FreeBSD.org>
Wed, 23 Sep 2015 07:44:07 +0000 (07:44 +0000)
Reported by: pho

sys/kern/vfs_bio.c

index 2b389c3702951e048ed277bf4dc67307a01adf18..5053fd1ecc42f1619acc8e001753c07a707c2eaa 100644 (file)
@@ -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;