summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_vnops.c
diff options
context:
space:
mode:
authormsmith <msmith@FreeBSD.org>1998-05-07 04:58:58 +0000
committermsmith <msmith@FreeBSD.org>1998-05-07 04:58:58 +0000
commit964ce778b1ba281a004f70a3b477fbca7c441e6b (patch)
treee3261d6a1cd9c2ca87c73ec9a35aa31aefbfc7c4 /sys/kern/vfs_vnops.c
parenta64c77cceb4f88e319290462be5ec2b74e6b03a1 (diff)
downloadFreeBSD-src-964ce778b1ba281a004f70a3b477fbca7c441e6b.zip
FreeBSD-src-964ce778b1ba281a004f70a3b477fbca7c441e6b.tar.gz
In the words of the submitter:
--------- Make callers of namei() responsible for releasing references or locks instead of having the underlying filesystems do it. This eliminates redundancy in all terminal filesystems and makes it possible for stacked transport layers such as umapfs or nullfs to operate correctly. Quality testing was done with testvn, and lat_fs from the lmbench suite. Some NFS client testing courtesy of Patrik Kudo. vop_mknod and vop_symlink still release the returned vpp. vop_rename still releases 4 vnode arguments before it returns. These remaining cases will be corrected in the next set of patches. --------- Submitted by: Michael Hancock <michaelh@cet.co.jp>
Diffstat (limited to 'sys/kern/vfs_vnops.c')
-rw-r--r--sys/kern/vfs_vnops.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c
index 31d4f2c..efee10e 100644
--- a/sys/kern/vfs_vnops.c
+++ b/sys/kern/vfs_vnops.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)vfs_vnops.c 8.2 (Berkeley) 1/21/94
- * $Id: vfs_vnops.c,v 1.55 1998/04/08 18:31:58 wosch Exp $
+ * $Id: vfs_vnops.c,v 1.56 1998/04/10 00:09:04 alex Exp $
*/
#include <sys/param.h>
@@ -95,8 +95,10 @@ vn_open(ndp, fmode, cmode)
if (fmode & O_EXCL)
vap->va_vaflags |= VA_EXCLUSIVE;
VOP_LEASE(ndp->ni_dvp, p, cred, LEASE_WRITE);
- if (error = VOP_CREATE(ndp->ni_dvp, &ndp->ni_vp,
- &ndp->ni_cnd, vap))
+ error = VOP_CREATE(ndp->ni_dvp, &ndp->ni_vp,
+ &ndp->ni_cnd, vap);
+ vput(ndp->ni_dvp);
+ if (error)
return (error);
ASSERT_VOP_UNLOCKED(ndp->ni_dvp, "create");
ASSERT_VOP_LOCKED(ndp->ni_vp, "create");
OpenPOWER on IntegriCloud