mirror of
https://git.freebsd.org/src.git
synced 2026-01-17 07:11:54 +00:00
vfs: retire NDFREE
There are no consumers anymore. Interested parties can NDFREE_PNBUF and vput or vrele relevant vnodes. Tested by: pho
This commit is contained in:
parent
85dac03e30
commit
269c564b90
2 changed files with 0 additions and 49 deletions
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue