Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 May 2009 05:49:02 +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: r192010 - in head/sys: fs/smbfs nfsclient vm
Message-ID:  <200905120549.n4C5n2Cj012608@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: alc
Date: Tue May 12 05:49:02 2009
New Revision: 192010
URL: http://svn.freebsd.org/changeset/base/192010

Log:
  Eliminate gratuitous clearing of the page's dirty mask.

Modified:
  head/sys/fs/smbfs/smbfs_io.c
  head/sys/nfsclient/nfs_bio.c
  head/sys/vm/vnode_pager.c

Modified: head/sys/fs/smbfs/smbfs_io.c
==============================================================================
--- head/sys/fs/smbfs/smbfs_io.c	Tue May 12 03:30:25 2009	(r192009)
+++ head/sys/fs/smbfs/smbfs_io.c	Tue May 12 05:49:02 2009	(r192010)
@@ -517,7 +517,8 @@ smbfs_getpages(ap)
 			 * Read operation filled an entire page
 			 */
 			m->valid = VM_PAGE_BITS_ALL;
-			vm_page_undirty(m);
+			KASSERT(m->dirty == 0,
+			    ("smbfs_getpages: page %p is dirty", m));
 		} else if (size > toff) {
 			/*
 			 * Read operation filled a partial page.

Modified: head/sys/nfsclient/nfs_bio.c
==============================================================================
--- head/sys/nfsclient/nfs_bio.c	Tue May 12 03:30:25 2009	(r192009)
+++ head/sys/nfsclient/nfs_bio.c	Tue May 12 05:49:02 2009	(r192010)
@@ -209,7 +209,8 @@ nfs_getpages(struct vop_getpages_args *a
 			 * Read operation filled an entire page
 			 */
 			m->valid = VM_PAGE_BITS_ALL;
-			vm_page_undirty(m);
+			KASSERT(m->dirty == 0,
+			    ("nfs_getpages: page %p is dirty", m));
 		} else if (size > toff) {
 			/*
 			 * Read operation filled a partial page.

Modified: head/sys/vm/vnode_pager.c
==============================================================================
--- head/sys/vm/vnode_pager.c	Tue May 12 03:30:25 2009	(r192009)
+++ head/sys/vm/vnode_pager.c	Tue May 12 05:49:02 2009	(r192010)
@@ -762,7 +762,8 @@ vnode_pager_generic_getpages(vp, m, byte
 		return VM_PAGER_OK;
 	} else if (reqblock == -1) {
 		pmap_zero_page(m[reqpage]);
-		vm_page_undirty(m[reqpage]);
+		KASSERT(m[reqpage]->dirty == 0,
+		    ("vnode_pager_generic_getpages: page %p is dirty", m));
 		m[reqpage]->valid = VM_PAGE_BITS_ALL;
 		vm_page_lock_queues();
 		for (i = 0; i < count; i++)



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