From nobody Mon Sep 19 20:09:02 2022 X-Original-To: dev-commits-src-main@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 4MWbNZ3TV1z4chfm; Mon, 19 Sep 2022 20:09:02 +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 4MWbNZ2yRlz3w8P; Mon, 19 Sep 2022 20:09:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1663618142; 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=Rz5oP2b44jTU1OuuZEuvBElt1L5gh77zOrD08v9hZ2Q=; b=kumuCkmSusdV0S6ZdNwmTmVTM0AyebcCp3i7CmX4iaXCqOmVOKxcAxchvhQNcAxnzIfzTI 7k/IwEDTPWTf5KXvKZmd40gv1DiMuJJFAnf/l8L2Zwbl7m73rgVOeXbB0qOFbJikj4060h WumjrEAptEGt4w0f21BCyTpTCWVt/bt/vjOyV0wfu2swNgFCVKIr9WubAG+Lv3mxXUsHwt SB1drgZqoKt8RoAssY3fzJ6KlCDpMe9C+DLMZI9jf42LfPKPCMmq8+mrznMlReX71+3Yd/ jHn6ZePXCUnwLbSc4K8bhrSJJeNBFtzCyamnlUV9XMu1TZTbKS6IFvIg9NgK3w== 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 4MWbNZ21hqzVB3; Mon, 19 Sep 2022 20:09:02 +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 28JK927G075124; Mon, 19 Sep 2022 20:09:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 28JK924f075123; Mon, 19 Sep 2022 20:09:02 GMT (envelope-from git) Date: Mon, 19 Sep 2022 20:09:02 GMT Message-Id: <202209192009.28JK924f075123@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: 2c2ef670a79b - main - pseudofs: use the vget_prep/vget_finish idiom List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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: 2c2ef670a79b7f8fa84796a04885a3f76c914762 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1663618142; 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=Rz5oP2b44jTU1OuuZEuvBElt1L5gh77zOrD08v9hZ2Q=; b=s3Ij+mm0h6WU5+PUVWPZza6/ZDuKlVfnGMaCh1HwxLcebYPxcN6KeDOyxyFTHk2nAoIkSV m4cozZqXrUCG5H6QktGREFBcgg6/Nd6Z09q/FHtDiV8Y56gMQZFYl4vTeHAafUIBV0vbdO RfqNLmerbrQ82IeU9TbwWziSfOVitoZ0Gz5EsXMaM5D5TlECky/MlA5qxDrRy5BDAgp9Da W1xmaID/dUxgbFGFj4QvobEkYttofpRMWV3QWtRzXbegqBCspJ5lJaRL2oqRzsigtEVzik lFAunAnCFky7j8xrG6WoW+F9KdLAaPWnK3uMKd69JQlWfEboF2IktrlTFEXKww== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1663618142; a=rsa-sha256; cv=none; b=k01iZ4LLXYLik1ev6LmZy8x4BOTLDCXnBvBXPP6ZWvnHujQneVZHg9d7elOqFavgeR7U08 ZpOCSQoozBndIB1ypHXlTy19HkCHXznZXtZID3K+pz4/HdOYa4uExNHUSXBvvq6c4HxBQ7 nkJaHAPdm37H0bmoKILzBmaxq2mpsMQ6zYWd+Mw9Y46rYW7sC1tR5tfapDWbGJ85KKvxjw 56MzruIkys0eT7HlyhFJYK8lkTc9Kv66itqAG6jIRFyo1kW/khyUEaUYyoSgFZ9XJV2TeI CoGob8kNad8dgr5FnTA5IShfj2yB4Q3e6ZyeOk/2C1uTelCEmPJJzJw4BXj4jw== 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=2c2ef670a79b7f8fa84796a04885a3f76c914762 commit 2c2ef670a79b7f8fa84796a04885a3f76c914762 Author: Mateusz Guzik AuthorDate: 2022-09-19 20:07:10 +0000 Commit: Mateusz Guzik CommitDate: 2022-09-19 20:08:40 +0000 pseudofs: use the vget_prep/vget_finish idiom --- sys/fs/pseudofs/pseudofs_vncache.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/fs/pseudofs/pseudofs_vncache.c b/sys/fs/pseudofs/pseudofs_vncache.c index 15892b510973..2b7ffae9921d 100644 --- a/sys/fs/pseudofs/pseudofs_vncache.c +++ b/sys/fs/pseudofs/pseudofs_vncache.c @@ -218,9 +218,9 @@ retry2: if (pvd2->pvd_pn == pn && pvd2->pvd_pid == pid && pvd2->pvd_vnode->v_mount == mp) { vp = pvd2->pvd_vnode; - VI_LOCK(vp); + vs = vget_prep(vp); mtx_unlock(&pfs_vncache_mutex); - if (vget(vp, LK_EXCLUSIVE | LK_INTERLOCK) == 0) { + if (vget_finish(vp, LK_EXCLUSIVE, vs) == 0) { ++pfs_vncache_hits; vgone(*vpp); vput(*vpp);