From nobody Wed Oct 26 15:54:53 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MyD0F3V2kz4gVBX; Wed, 26 Oct 2022 15:54:53 +0000 (UTC) (envelope-from git@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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MyD0F2ywLz3RkT; Wed, 26 Oct 2022 15:54:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1666799693; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BKxLAQ39HrqR2vuMm/KVbDExJJnJEtj0bqbl2X4WXCg=; b=ukq9p3NILrytFeX/qDG5ZlXuvlNYan/hjhP4RfqVimP+1DL5Vfou/RpAHezDdbimHYGnwu FIkGyEGLHZN+bI9gHVK85+jKTzUu6nBDX0XdkeDL6rq6zSD7ggLzx4+FmjyE09zVjAC179 948yOX80bqC2r4Ki348bRIdmOR1CZio4UVL9F5eyYQBw5osP1DSkmvggevo76xsUA5IRw7 4zYMJ/M13+PtNvyecQu6+ztbpD1GcuWc6D46o9vTdt01iLmmBBy52qwOfMr+7BidVZK+ek 7zEHVf9G5jWBhZw6NjrV02OAtQp3SIh11IdTe79sq5DMeOmejfJu6+7GnbtphQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4MyD0F20THzN8v; Wed, 26 Oct 2022 15:54:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 29QFsrwl012043; Wed, 26 Oct 2022 15:54:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 29QFsrK2012042; Wed, 26 Oct 2022 15:54:53 GMT (envelope-from git) Date: Wed, 26 Oct 2022 15:54:53 GMT Message-Id: <202210261554.29QFsrK2012042@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: d346e3ac3310 - main - vfs: use cache_assert_no_entries instead of open-coding it List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d346e3ac33105922a5812d480b49f7dda674d136 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1666799693; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BKxLAQ39HrqR2vuMm/KVbDExJJnJEtj0bqbl2X4WXCg=; b=BHK20Z8F2tqlOLSnixMY4BoTSlbr77j1YgpjEEmTemUdyts7PDzENQRoFCFYcHajvd0QnK 1ffhSBzPurCU/HbpoQNW4X44xL2oWdBzVtwklttY8tUfjqbc/kQrZMpYEABAhVaqDXG2ps SW0JZnql9Kzt74vMTJDQDSwtRMhzHm73iMZiSEIfOKWown+O6Mm3pqGCqpeOsxTCaO7e20 s2UHTwIXt1cZgJxZOyinQwByiywObnBsl+aXtkpA6z0aijNdvjTDxTlIlrYb/IUSC2YV03 aPl19P7yK9TT69nb1wHM4Epfrp9j4S+U3L1JtRC5t+mAg/ZW1NntqFoFMLIuaA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1666799693; a=rsa-sha256; cv=none; b=Zd3DGpgYu98MCrga30dTnhuXTYEKFCBxO7eL/hp80Cy+npac15uzlPxYFQc+ClAhpQeDXT TkLl6t5uBZZ2GyZ0oHkpe8bW9hjyzg9e6xG3RxLotinxRXOgBimK7JE25QYFw+PG4PuXax 06cRMb7IvfofzjlZ64FF2K5irc5PRCUkpq49XnoA+pWhYEVbVHpy852//bvYcIWamega35 KI8pZpfHBNfOz3TvL+PFCZ43AQk6rC3xW4l/AxjeslmCvaKnqgDLQeCPiXAtkxGkyUOhDm FX8YK3VmZQlQ37tz4nFq20CXfVbNLKyvHfSlkYgxXZxV8BKAMzayN/bVjQji+Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=d346e3ac33105922a5812d480b49f7dda674d136 commit d346e3ac33105922a5812d480b49f7dda674d136 Author: Mateusz Guzik AuthorDate: 2022-10-26 15:33:47 +0000 Commit: Mateusz Guzik CommitDate: 2022-10-26 15:54:19 +0000 vfs: use cache_assert_no_entries instead of open-coding it --- sys/kern/vfs_subr.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index a590579a25c0..adf2968e7f56 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -1906,14 +1906,13 @@ freevnode(struct vnode *vp) VNASSERT(bo->bo_dirty.bv_cnt == 0, vp, ("dirtybufcnt not 0")); VNASSERT(pctrie_is_empty(&bo->bo_dirty.bv_root), vp, ("dirty blk trie not empty")); - VNASSERT(TAILQ_EMPTY(&vp->v_cache_dst), vp, ("vp has namecache dst")); - VNASSERT(LIST_EMPTY(&vp->v_cache_src), vp, ("vp has namecache src")); - VNASSERT(vp->v_cache_dd == NULL, vp, ("vp has namecache for ..")); VNASSERT(TAILQ_EMPTY(&vp->v_rl.rl_waiters), vp, ("Dangling rangelock waiters")); VNASSERT((vp->v_iflag & (VI_DOINGINACT | VI_OWEINACT)) == 0, vp, ("Leaked inactivation")); VI_UNLOCK(vp); + cache_assert_no_entries(vp); + #ifdef MAC mac_vnode_destroy(vp); #endif