summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoreivind <eivind@FreeBSD.org>1999-12-18 17:12:15 +0000
committereivind <eivind@FreeBSD.org>1999-12-18 17:12:15 +0000
commit1a2b8e413c3906dea6cbdb44bea09c54866a1427 (patch)
tree657a70f9d2ae4595d28a9571760beaa9a5497b75
parentbf11704e75e0670d1380b777e7bcd6d5ddacab28 (diff)
downloadFreeBSD-src-1a2b8e413c3906dea6cbdb44bea09c54866a1427.zip
FreeBSD-src-1a2b8e413c3906dea6cbdb44bea09c54866a1427.tar.gz
Make NDFREE unlock VP if appropriate and not asked not to, as documented in
the manpage for namei(). This capability is not yet used attempted used anywhere in the source tree.
-rw-r--r--sys/sys/namei.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/sys/namei.h b/sys/sys/namei.h
index 854d779..143c0f0 100644
--- a/sys/sys/namei.h
+++ b/sys/sys/namei.h
@@ -188,6 +188,9 @@ NDINIT(ndp, op, flags, segflg, namep, p)
vrele(_ndp->ni_dvp); \
_ndp->ni_dvp = NULL; \
} \
+ if (!(_flags & NDF_NO_VP_UNLOCK) && \
+ (_ndp->ni_cnd.cn_flags & LOCKLEAF) && _ndp->ni_vp) \
+ VOP_UNLOCK(_ndp->ni_vp, 0, _ndp->ni_cnd.cn_proc); \
if (!(_flags & NDF_NO_VP_RELE) && \
_ndp->ni_vp) { \
vrele(_ndp->ni_vp); \
OpenPOWER on IntegriCloud