From owner-svn-src-stable@FreeBSD.ORG Fri May 23 17:47:50 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2287F9DC; Fri, 23 May 2014 17:47:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E74FB2592; Fri, 23 May 2014 17:47:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4NHlnGS062313; Fri, 23 May 2014 17:47:49 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4NHlnKr062310; Fri, 23 May 2014 17:47:49 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201405231747.s4NHlnKr062310@svn.freebsd.org> From: Alan Cox Date: Fri, 23 May 2014 17:47:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266591 - stable/10/sys/vm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 May 2014 17:47:50 -0000 Author: alc Date: Fri May 23 17:47:49 2014 New Revision: 266591 URL: http://svnweb.freebsd.org/changeset/base/266591 Log: MFC r259107 Eliminate a redundant parameter to vm_radix_replace(). Improve the wording of the comment describing vm_radix_replace(). Modified: stable/10/sys/vm/vm_page.c stable/10/sys/vm/vm_radix.c stable/10/sys/vm/vm_radix.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/vm/vm_page.c ============================================================================== --- stable/10/sys/vm/vm_page.c Fri May 23 17:46:00 2014 (r266590) +++ stable/10/sys/vm/vm_page.c Fri May 23 17:47:49 2014 (r266591) @@ -1200,7 +1200,7 @@ vm_page_replace(vm_page_t mnew, vm_objec mnew->object = object; mnew->pindex = pindex; - mold = vm_radix_replace(&object->rtree, mnew, pindex); + mold = vm_radix_replace(&object->rtree, mnew); KASSERT(mold->queue == PQ_NONE, ("vm_page_replace: mold is on a paging queue")); Modified: stable/10/sys/vm/vm_radix.c ============================================================================== --- stable/10/sys/vm/vm_radix.c Fri May 23 17:46:00 2014 (r266590) +++ stable/10/sys/vm/vm_radix.c Fri May 23 17:47:49 2014 (r266591) @@ -788,20 +788,18 @@ vm_radix_reclaim_allnodes(struct vm_radi } /* - * Replace an existing page into the trie with another one. - * Panics if the replacing page is not present or if the new page has an - * invalid key. + * Replace an existing page in the trie with another one. + * Panics if there is not an old page in the trie at the new page's index. */ vm_page_t -vm_radix_replace(struct vm_radix *rtree, vm_page_t newpage, vm_pindex_t index) +vm_radix_replace(struct vm_radix *rtree, vm_page_t newpage) { struct vm_radix_node *rnode; vm_page_t m; + vm_pindex_t index; int slot; - KASSERT(newpage->pindex == index, ("%s: newpage index invalid", - __func__)); - + index = newpage->pindex; rnode = vm_radix_getroot(rtree); if (rnode == NULL) panic("%s: replacing page on an empty trie", __func__); Modified: stable/10/sys/vm/vm_radix.h ============================================================================== --- stable/10/sys/vm/vm_radix.h Fri May 23 17:46:00 2014 (r266590) +++ stable/10/sys/vm/vm_radix.h Fri May 23 17:47:49 2014 (r266591) @@ -43,8 +43,7 @@ vm_page_t vm_radix_lookup_ge(struct vm_r vm_page_t vm_radix_lookup_le(struct vm_radix *rtree, vm_pindex_t index); void vm_radix_reclaim_allnodes(struct vm_radix *rtree); void vm_radix_remove(struct vm_radix *rtree, vm_pindex_t index); -vm_page_t vm_radix_replace(struct vm_radix *rtree, vm_page_t newpage, - vm_pindex_t index); +vm_page_t vm_radix_replace(struct vm_radix *rtree, vm_page_t newpage); #endif /* _KERNEL */ #endif /* !_VM_RADIX_H_ */