From owner-svn-src-head@freebsd.org Wed Aug 12 04:53:21 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5A3C43BDB67; Wed, 12 Aug 2020 04:53:21 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BRHQT1l9wz4R7b; Wed, 12 Aug 2020 04:53:21 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1F28F2656D; Wed, 12 Aug 2020 04:53:21 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07C4rLg8065835; Wed, 12 Aug 2020 04:53:21 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07C4rKPU065834; Wed, 12 Aug 2020 04:53:20 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202008120453.07C4rKPU065834@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Wed, 12 Aug 2020 04:53:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364141 - in head/sys: kern sys X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: in head/sys: kern sys X-SVN-Commit-Revision: 364141 X-SVN-Commit-Repository: base 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.33 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: Wed, 12 Aug 2020 04:53:21 -0000 Author: mjg Date: Wed Aug 12 04:53:20 2020 New Revision: 364141 URL: https://svnweb.freebsd.org/changeset/base/364141 Log: vfs: inline vrefcnt Modified: head/sys/kern/vfs_subr.c head/sys/sys/vnode.h Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Wed Aug 12 04:53:02 2020 (r364140) +++ head/sys/kern/vfs_subr.c Wed Aug 12 04:53:20 2020 (r364141) @@ -2952,22 +2952,6 @@ vrefact(struct vnode *vp) #endif } -/* - * Return reference count of a vnode. - * - * The results of this call are only guaranteed when some mechanism is used to - * stop other processes from gaining references to the vnode. This may be the - * case if the caller holds the only reference. This is also useful when stale - * data is acceptable as race conditions may be accounted for by some other - * means. - */ -int -vrefcnt(struct vnode *vp) -{ - - return (vp->v_usecount); -} - void vlazy(struct vnode *vp) { Modified: head/sys/sys/vnode.h ============================================================================== --- head/sys/sys/vnode.h Wed Aug 12 04:53:02 2020 (r364140) +++ head/sys/sys/vnode.h Wed Aug 12 04:53:20 2020 (r364141) @@ -967,8 +967,13 @@ void vrele(struct vnode *vp); void vref(struct vnode *vp); void vrefl(struct vnode *vp); void vrefact(struct vnode *vp); -int vrefcnt(struct vnode *vp); void v_addpollinfo(struct vnode *vp); +static __inline int +vrefcnt(struct vnode *vp) +{ + + return (vp->v_usecount); +} int vnode_create_vobject(struct vnode *vp, off_t size, struct thread *td); void vnode_destroy_vobject(struct vnode *vp);