From owner-svn-src-head@FreeBSD.ORG Sun Jun 8 19:01:38 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7F6194C2; Sun, 8 Jun 2014 19:01:38 +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 6BE642F24; Sun, 8 Jun 2014 19:01:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s58J1cbe061477; Sun, 8 Jun 2014 19:01:38 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s58J1cJg061476; Sun, 8 Jun 2014 19:01:38 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201406081901.s58J1cJg061476@svn.freebsd.org> From: Alexander Motin Date: Sun, 8 Jun 2014 19:01:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r267239 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jun 2014 19:01:38 -0000 Author: mav Date: Sun Jun 8 19:01:37 2014 New Revision: 267239 URL: http://svnweb.freebsd.org/changeset/base/267239 Log: Remove extra branching from r267232. MFC after: 2 weeks Modified: head/sys/kern/vfs_subr.c Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Sun Jun 8 18:11:53 2014 (r267238) +++ head/sys/kern/vfs_subr.c Sun Jun 8 19:01:37 2014 (r267239) @@ -995,18 +995,14 @@ void getnewvnode_reserve(u_int count) { struct thread *td; - long num; td = curthread; /* First try to be quick and racy. */ - if (numvnodes + count <= desiredvnodes) { - num = atomic_fetchadd_long(&numvnodes, count); - if (num + count <= desiredvnodes) { - td->td_vp_reserv += count; - return; - } else - atomic_subtract_long(&numvnodes, count); - } + if (atomic_fetchadd_long(&numvnodes, count) + count <= desiredvnodes) { + td->td_vp_reserv += count; + return; + } else + atomic_subtract_long(&numvnodes, count); mtx_lock(&vnode_free_list_mtx); while (count > 0) {