summaryrefslogtreecommitdiffstats
path: root/sys/vm/vnode_pager.c
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2009-05-15 04:33:35 +0000
committeralc <alc@FreeBSD.org>2009-05-15 04:33:35 +0000
commit1af8842f56411a768c8a8b8fee2845313dba8223 (patch)
treea86532abfd963fc5ea7bcdfd1df5cd2b4cfd3465 /sys/vm/vnode_pager.c
parent768767541d0c2e71285019bc8fd72c4d77ca9eb6 (diff)
downloadFreeBSD-src-1af8842f56411a768c8a8b8fee2845313dba8223.zip
FreeBSD-src-1af8842f56411a768c8a8b8fee2845313dba8223.tar.gz
Eliminate unnecessary clearing of the page's dirty mask from various
getpages functions. Eliminate a stale comment.
Diffstat (limited to 'sys/vm/vnode_pager.c')
-rw-r--r--sys/vm/vnode_pager.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/vm/vnode_pager.c b/sys/vm/vnode_pager.c
index cf9dcb1..ed09044 100644
--- a/sys/vm/vnode_pager.c
+++ b/sys/vm/vnode_pager.c
@@ -939,17 +939,18 @@ vnode_pager_generic_getpages(vp, m, bytecount, reqpage)
mt));
} else {
/*
- * Read did not fill up entire page. Since this
- * is getpages, the page may be mapped, so we have
- * to zero the invalid portions of the page even
- * though we aren't setting them valid.
+ * Read did not fill up entire page.
*
* Currently we do not set the entire page valid,
* we just try to clear the piece that we couldn't
* read.
*/
- vm_page_set_validclean(mt, 0,
+ vm_page_set_valid(mt, 0,
object->un_pager.vnp.vnp_size - tfoff);
+ KASSERT((mt->dirty & vm_page_bits(0,
+ object->un_pager.vnp.vnp_size - tfoff)) == 0,
+ ("vnode_pager_generic_getpages: page %p is dirty",
+ mt));
}
if (i != reqpage) {
OpenPOWER on IntegriCloud