From nobody Mon Dec 19 08:14:38 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 4NbCDG5RXwz1G1S6; Mon, 19 Dec 2022 08:14:38 +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 4NbCDG4wncz3LcZ; Mon, 19 Dec 2022 08:14:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1671437678; 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=SaKNWRPkgvqHUBcOlQM2J6Ex/b39kShznOqxFgg0cVo=; b=aB7dX7LMiArzBYrAUjf46e4GcwfaEO+4J2JT3ky9xZZ1KK2mZ7xK7IESYblmPNJ2w1wNRH a8MVq2l4RHePdGahjwcb6jDE2vwb2hjBHF4Su5C2RjtpFwYNhvvU643sbzwPN33tkczA5n 0viHHqqD6KLx7Qt7nw113NBMuObnLg1UQfolQTbn+rViI/m2uPJvAxiTxZMQXKLNXPinqZ bl3ZQ+XDdWKaKmB2rJzvWz8y7CRpKu9Ab9Tpo2w07rWC7sayjt2dUb28mh6j5v7Qk807TN U0gNsFewTJNfeHnQmtCLm9p3y2k/2LQWuvzwLho6ojXa5EQZQ8oYUo0yX26CAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1671437678; 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=SaKNWRPkgvqHUBcOlQM2J6Ex/b39kShznOqxFgg0cVo=; b=PtNSRwzzE0SMiTv1KosZEy8EWv2vNW+22qsuLoeohmychAjHAkGeExBtfnFX5DXdu+QTsf Qa0705srxVG1OucNajMPEuDJG2/13hemZ0q1zJ/uHlVxX2GEmzBSMlqwSVCo353b5BdoIU jENVDvckDvJ7/f4FaGDlNYLk2Wtmod5OsiY7aPD7HIm9YGsSl9Az8xDKQnueJMrWcwBUjH gx2GViGy79GFJI25Wh6cc9KvDaE856VwjVrhLMjbrsE1iyUKmQaF9IJHa6yUmG6r7L4NiC 2hGBOAxYf/pNiL6Oe2m8NeMF735v3PVKK800HynxpIZ077kOLdQ7uXXduoxIsw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1671437678; a=rsa-sha256; cv=none; b=kBNzTNo6Qv+8jdJuIvcO7AxkvUlo4qS5wlp379XCQgdTiG5Hrnj7yPtnquxouWPQJPHf+E DowXCXxkmp20zhsRjmZVRhO64VzAC67M7pvt4Rq9wacQLDw1y2ObeXMMCZhAL2RhNm3bjb elzVV9tB9CP/CYSymgK8oxYOMl1GMixzWhP2Jg4egdqajlYV4dj5zH+LYs+zl/mZaIFhYl Ybq88vpu+C6bn1/EUj3iliWgenZ4kR8y0twlEHlv4Gpu7un87EhEoKrY8K71Gt3yPkBFEA PJeWxpR5BXyM/FhweQDv0vq/Gk0jefOLjBOZuSljo4Vwx+vJthDpyadE6RIQ+Q== 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 4NbCDG40fbzpJc; Mon, 19 Dec 2022 08:14:38 +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 2BJ8EcaZ052956; Mon, 19 Dec 2022 08:14:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2BJ8EcoL052955; Mon, 19 Dec 2022 08:14:38 GMT (envelope-from git) Date: Mon, 19 Dec 2022 08:14:38 GMT Message-Id: <202212190814.2BJ8EcoL052955@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: 269c564b90d3 - main - vfs: retire NDFREE 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: 269c564b90d3f95ac3afbd4bd1adad36681f2b93 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=269c564b90d3f95ac3afbd4bd1adad36681f2b93 commit 269c564b90d3f95ac3afbd4bd1adad36681f2b93 Author: Mateusz Guzik AuthorDate: 2022-11-17 16:59:20 +0000 Commit: Mateusz Guzik CommitDate: 2022-12-19 08:07:54 +0000 vfs: retire NDFREE There are no consumers anymore. Interested parties can NDFREE_PNBUF and vput or vrele relevant vnodes. Tested by: pho --- sys/kern/vfs_lookup.c | 47 ----------------------------------------------- sys/sys/namei.h | 2 -- 2 files changed, 49 deletions(-) diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c index 404c41a1bf2c..ac5617616e30 100644 --- a/sys/kern/vfs_lookup.c +++ b/sys/kern/vfs_lookup.c @@ -1556,53 +1556,6 @@ bad: return (error); } -void -(NDFREE)(struct nameidata *ndp, const u_int flags) -{ - int unlock_dvp; - int unlock_vp; - - unlock_dvp = 0; - unlock_vp = 0; - - if (!(flags & NDF_NO_FREE_PNBUF)) { - NDFREE_PNBUF(ndp); - } - if (!(flags & NDF_NO_VP_UNLOCK) && - (ndp->ni_cnd.cn_flags & LOCKLEAF) && ndp->ni_vp) - unlock_vp = 1; - if (!(flags & NDF_NO_DVP_UNLOCK) && - (ndp->ni_cnd.cn_flags & LOCKPARENT) && - ndp->ni_dvp != ndp->ni_vp) - unlock_dvp = 1; - if (!(flags & NDF_NO_VP_RELE) && ndp->ni_vp) { - if (unlock_vp) { - vput(ndp->ni_vp); - unlock_vp = 0; - } else - vrele(ndp->ni_vp); - ndp->ni_vp = NULL; - } - if (unlock_vp) - VOP_UNLOCK(ndp->ni_vp); - if (!(flags & NDF_NO_DVP_RELE) && - (ndp->ni_cnd.cn_flags & (LOCKPARENT|WANTPARENT))) { - if (unlock_dvp) { - vput(ndp->ni_dvp); - unlock_dvp = 0; - } else - vrele(ndp->ni_dvp); - ndp->ni_dvp = NULL; - } - if (unlock_dvp) - VOP_UNLOCK(ndp->ni_dvp); - if (!(flags & NDF_NO_STARTDIR_RELE) && - (ndp->ni_cnd.cn_flags & SAVESTART)) { - vrele(ndp->ni_startdir); - ndp->ni_startdir = NULL; - } -} - #ifdef INVARIANTS /* * Validate the final state of ndp after the lookup. diff --git a/sys/sys/namei.h b/sys/sys/namei.h index 75e4051d8879..d527d4a3bed0 100644 --- a/sys/sys/namei.h +++ b/sys/sys/namei.h @@ -290,8 +290,6 @@ do { \ _ndp->ni_cnd.cn_pnbuf = NULL; \ } while (0) -void NDFREE(struct nameidata *, const u_int); - int namei(struct nameidata *ndp); int vfs_lookup(struct nameidata *ndp); int vfs_relookup(struct vnode *dvp, struct vnode **vpp,