From owner-svn-src-all@FreeBSD.ORG Wed May 21 08:19:05 2014 Return-Path: Delivered-To: svn-src-all@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 7B908606; Wed, 21 May 2014 08:19:05 +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 69B9B2B7C; Wed, 21 May 2014 08:19:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4L8J5Ge080526; Wed, 21 May 2014 08:19:05 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4L8J52M080525; Wed, 21 May 2014 08:19:05 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201405210819.s4L8J52M080525@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 21 May 2014 08:19:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r266491 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18 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: Wed, 21 May 2014 08:19:05 -0000 Author: kib Date: Wed May 21 08:19:04 2014 New Revision: 266491 URL: http://svnweb.freebsd.org/changeset/base/266491 Log: Remove redundand loop. The inner goto restarts the whole page handling in the situation identical to the loop condition. Sponsored by: The FreeBSD Foundation MFC after: 3 days Modified: head/sys/vm/vm_fault.c Modified: head/sys/vm/vm_fault.c ============================================================================== --- head/sys/vm/vm_fault.c Wed May 21 08:09:44 2014 (r266490) +++ head/sys/vm/vm_fault.c Wed May 21 08:19:04 2014 (r266491) @@ -1351,18 +1351,16 @@ again: /* * Allocate a page in the destination object. */ - do { - dst_m = vm_page_alloc(dst_object, - (src_object == dst_object ? src_pindex : - 0) + dst_pindex, VM_ALLOC_NORMAL); - if (dst_m == NULL) { - VM_OBJECT_WUNLOCK(dst_object); - VM_OBJECT_RUNLOCK(object); - VM_WAIT; - VM_OBJECT_WLOCK(dst_object); - goto again; - } - } while (dst_m == NULL); + dst_m = vm_page_alloc(dst_object, (src_object == + dst_object ? src_pindex : 0) + dst_pindex, + VM_ALLOC_NORMAL); + if (dst_m == NULL) { + VM_OBJECT_WUNLOCK(dst_object); + VM_OBJECT_RUNLOCK(object); + VM_WAIT; + VM_OBJECT_WLOCK(dst_object); + goto again; + } pmap_copy_page(src_m, dst_m); VM_OBJECT_RUNLOCK(object); dst_m->valid = VM_PAGE_BITS_ALL;