Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 23 May 2009 18:25:11 +0000 (UTC)
From:      Alan Cox <alc@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r192657 - head/sys/fs/nwfs
Message-ID:  <200905231825.n4NIPBZN063332@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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) {



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