svn commit: r192657 - head/sys/fs/nwfs
Alan Cox
alc at FreeBSD.org
Sat May 23 18:25:11 UTC 2009
Author: alc
Date: Sat May 23 18:25:11 2009
New Revision: 192657
URL: http://svn.freebsd.org/changeset/base/192657
Log:
Eliminate the unnecessary clearing of a page's dirty bits from
nwfs_getpages().
Modified:
head/sys/fs/nwfs/nwfs_io.c
Modified: head/sys/fs/nwfs/nwfs_io.c
==============================================================================
--- head/sys/fs/nwfs/nwfs_io.c Sat May 23 18:18:06 2009 (r192656)
+++ head/sys/fs/nwfs/nwfs_io.c Sat May 23 18:25:11 2009 (r192657)
@@ -463,10 +463,13 @@ nwfs_getpages(ap)
if (nextoff <= size) {
m->valid = VM_PAGE_BITS_ALL;
- m->dirty = 0;
+ KASSERT(m->dirty == 0,
+ ("nwfs_getpages: page %p is dirty", m));
} else {
int nvalid = ((size + DEV_BSIZE - 1) - toff) & ~(DEV_BSIZE - 1);
- vm_page_set_validclean(m, 0, nvalid);
+ vm_page_set_valid(m, 0, nvalid);
+ KASSERT((m->dirty & vm_page_bits(0, nvalid)) == 0,
+ ("nwfs_getpages: page %p is dirty", m));
}
if (i != ap->a_reqpage) {
More information about the svn-src-head
mailing list