From nobody Fri Mar 24 17:47:42 2023 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 4PjqRf6ZbLz40sgG; Fri, 24 Mar 2023 17:47:42 +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 4PjqRf64jkz4Thl; Fri, 24 Mar 2023 17:47:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1679680062; 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=T6nva03Y0uappS8EXFVPPB0rQKFHxmQ+AJmF+H8VtC8=; b=xv0AQMUcdiJZkXCrGnZjs9nDgxRTrgTaiysWoVmHYKGByZCJdXszMwoCSc0Ce/KbmyuZg2 oqj2ve3gSojcpNk1nFOxau9x4LYiM2nEOoUwLC7ff5oZYln4uv3Bz428LxfL+4VvWhbDV8 EQN/qZ9201qu8sYZaMB9l+kyqjUOskhK+27AiQUGUeUps1n21bp9EmmyB71q/ufuhjUv3/ 4hHD8jXirJPsIgujMkw/9nZpQVUEZGkbmR4tosqXskMmrBJQJo5H5i8FAtprOI1GwDhJJl HQbOZh9uCWiGoNjw5+xJsSKAQ8sFB+K8wcIxnzR6DOgrL03kHdiyUMuJtxreJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1679680062; 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=T6nva03Y0uappS8EXFVPPB0rQKFHxmQ+AJmF+H8VtC8=; b=DIsU+dZtivVqSsZBFv5DDm/940WqeXZjwTQl0QBh65YWBUI50wyjxXtxjqmssafatrt6P6 s63IedC4BQuMX69N0bQs5WHH+XpNbv6aXWH00zbusY43BCYEqG/f29KRindr3lW61PBZvG WPMEPssb+lPS1bzPcJnRkOpexEN1iKjUXbbSDxc6UR3ur4CFMuy4EQFp1uu+e4Fyg+4H6G y6UHy/ztPFkcheL9F1wUZyEk3yG6z9XmqxdxLfe8KNql/yeMNwN5mZ+QsbIYb0Gace9F5T NF+1W/raJ2DJdShF4XPDJQRt0p5S30Xl8tUfVIYvaV1kG4sDgttDogrv89fMvw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1679680062; a=rsa-sha256; cv=none; b=vawGVTsFv9P1HFU9gEpB22rL09zuc3sfblEZpfJaxI3H2LQitME9uOgZMPGqyfjmb7eiGa OZQhxYZTdfyBnoZcJHCPqQkj8gjjYy8PBqreZnoajnhUaa6LiL2/7HAMd0CGC0GlPBQman 8kWspgJzS5kwsTmtfHRfJWxUwZtF61UcGRItXvhM0YruSIF9QyCBXkgYc6ORyORBGNCo1Z b1veJksxDeB40PRENW97/RnpISKxWkxbtjYsnCjM/pkHmtPvOIhYDMZZeKcQtD8brQHVAZ oNO25yiWP0mCR/uUtPcz8XKN9v/8FTkef0dFBByflzP4K1jsdTTOb0bgWaZkCA== 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 4PjqRf5BnrzRsJ; Fri, 24 Mar 2023 17:47:42 +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 32OHlgPk075500; Fri, 24 Mar 2023 17:47:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 32OHlgH0075499; Fri, 24 Mar 2023 17:47:42 GMT (envelope-from git) Date: Fri, 24 Mar 2023 17:47:42 GMT Message-Id: <202303241747.32OHlgH0075499@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 8d97282a3942 - main - fdesc_lookup(): no need to vhold the dvp vnode 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: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8d97282a394278d29883e7afa98ed6294efab35e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=8d97282a394278d29883e7afa98ed6294efab35e commit 8d97282a394278d29883e7afa98ed6294efab35e Author: Konstantin Belousov AuthorDate: 2023-03-22 13:36:00 +0000 Commit: Konstantin Belousov CommitDate: 2023-03-24 17:47:07 +0000 fdesc_lookup(): no need to vhold the dvp vnode It is already referenced by the VOP_LOOKUP() caller, otherwise vdrop() after vn_lock() is invalid anyway. Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D39207 --- sys/fs/fdescfs/fdesc_vnops.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/fs/fdescfs/fdesc_vnops.c b/sys/fs/fdescfs/fdesc_vnops.c index afefaff8acf4..beef9295f11b 100644 --- a/sys/fs/fdescfs/fdesc_vnops.c +++ b/sys/fs/fdescfs/fdesc_vnops.c @@ -363,13 +363,11 @@ fdesc_lookup(struct vop_lookup_args *ap) * In case we're holding the last reference to the file, the dvp * will be re-acquired. */ - vhold(dvp); VOP_UNLOCK(dvp); fdrop(fp, td); fdropped = true; vn_lock(dvp, LK_RETRY | LK_EXCLUSIVE); - vdrop(dvp); fvp = dvp; if (error == 0 && VN_IS_DOOMED(dvp)) error = ENOENT;