Date: Thu, 3 Feb 2011 14:42:46 +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: r218223 - head/sys/kern Message-ID: <201102031442.p13EglG7048701@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: alc Date: Thu Feb 3 14:42:46 2011 New Revision: 218223 URL: http://svn.freebsd.org/changeset/base/218223 Log: Eliminate unnecessary page hold_count checks. These checks predate r90944, which introduced a general mechanism for handling the freeing of held pages. Reviewed by: kib@ Modified: head/sys/kern/uipc_syscalls.c head/sys/kern/vfs_bio.c Modified: head/sys/kern/uipc_syscalls.c ============================================================================== --- head/sys/kern/uipc_syscalls.c Thu Feb 3 13:10:13 2011 (r218222) +++ head/sys/kern/uipc_syscalls.c Thu Feb 3 14:42:46 2011 (r218223) @@ -2115,8 +2115,7 @@ retry_space: * then free it. */ if (pg->wire_count == 0 && pg->valid == 0 && - pg->busy == 0 && !(pg->oflags & VPO_BUSY) && - pg->hold_count == 0) + pg->busy == 0 && !(pg->oflags & VPO_BUSY)) vm_page_free(pg); vm_page_unlock(pg); VM_OBJECT_UNLOCK(obj); Modified: head/sys/kern/vfs_bio.c ============================================================================== --- head/sys/kern/vfs_bio.c Thu Feb 3 13:10:13 2011 (r218222) +++ head/sys/kern/vfs_bio.c Thu Feb 3 14:42:46 2011 (r218223) @@ -1647,8 +1647,7 @@ vfs_vmio_release(struct buf *bp) * no valid data. We also free the page if the * buffer was used for direct I/O */ - if ((bp->b_flags & B_ASYNC) == 0 && !m->valid && - m->hold_count == 0) { + if ((bp->b_flags & B_ASYNC) == 0 && !m->valid) { vm_page_free(m); } else if (bp->b_flags & B_DIRECT) { vm_page_try_to_free(m);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201102031442.p13EglG7048701>