From owner-svn-src-all@FreeBSD.ORG Sat May 23 18:25:11 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8E2DB106564A; Sat, 23 May 2009 18:25:11 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7CE048FC16; Sat, 23 May 2009 18:25:11 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n4NIPBUr063333; Sat, 23 May 2009 18:25:11 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n4NIPBZN063332; Sat, 23 May 2009 18:25:11 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <200905231825.n4NIPBZN063332@svn.freebsd.org> From: Alan Cox Date: Sat, 23 May 2009 18:25:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r192657 - head/sys/fs/nwfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 May 2009 18:25:11 -0000 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) {