diff options
author | Thorsten Lockert <tholo@cvs.openbsd.org> | 1997-05-21 14:51:27 +0000 |
---|---|---|
committer | Thorsten Lockert <tholo@cvs.openbsd.org> | 1997-05-21 14:51:27 +0000 |
commit | fb1b4d7f6f684f3e219ceae5eebfc7480f1cf344 (patch) | |
tree | d33e19de99dfe2e6bbb2eb2f86ac5f80c9417f9a /sys | |
parent | 936115aa47d5318b18a0c90152f04424df526502 (diff) |
Use vrele() if the vnode was not locked, not vput()
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/vfs_lookup.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c index 217f0b273df..d36c56cc5c1 100644 --- a/sys/kern/vfs_lookup.c +++ b/sys/kern/vfs_lookup.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_lookup.c,v 1.6 1997/03/01 23:03:38 tholo Exp $ */ +/* $OpenBSD: vfs_lookup.c,v 1.7 1997/05/21 14:51:26 tholo Exp $ */ /* $NetBSD: vfs_lookup.c,v 1.17 1996/02/09 19:00:59 christos Exp $ */ /* @@ -184,7 +184,10 @@ namei(ndp) if (dironly && ndp->ni_vp != NULL && ndp->ni_vp->v_type != VDIR) { if ((cnp->cn_flags & LOCKPARENT) && ndp->ni_pathlen == 1) VOP_UNLOCK(ndp->ni_dvp); - vput(ndp->ni_vp); + if (cnp->cn_flags & LOCKLEAF) + vput(ndp->ni_vp); + else + vrele(ndp->ni_vp); FREE(cnp->cn_pnbuf, M_NAMEI); return (ENOTDIR); } |