summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPedro Martelletto <pedro@cvs.openbsd.org>2005-08-14 12:41:45 +0000
committerPedro Martelletto <pedro@cvs.openbsd.org>2005-08-14 12:41:45 +0000
commitc597426383fb5684cefc1ff25e32e73fd2ec99ef (patch)
tree831cfcc3daf73a2691a211bb71bd63da22b63f89
parent05f65e9206b9cd43de5153156af9f071880462dc (diff)
When leaving ext2fs_symlink(), unlock the vnode on both error and
non-error cases, so that later on we don't deadlock trying to look it up. Fixes buglet introduced in revision 1.38, okay deraadt@.
-rw-r--r--sys/ufs/ext2fs/ext2fs_vnops.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/ufs/ext2fs/ext2fs_vnops.c b/sys/ufs/ext2fs/ext2fs_vnops.c
index 11cbaa0add4..818c56126b1 100644
--- a/sys/ufs/ext2fs/ext2fs_vnops.c
+++ b/sys/ufs/ext2fs/ext2fs_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ext2fs_vnops.c,v 1.40 2005/07/28 22:37:39 pedro Exp $ */
+/* $OpenBSD: ext2fs_vnops.c,v 1.41 2005/08/14 12:41:44 pedro Exp $ */
/* $NetBSD: ext2fs_vnops.c,v 1.1 1997/06/11 09:34:09 bouyer Exp $ */
/*
@@ -1194,8 +1194,7 @@ ext2fs_symlink(v)
UIO_SYSSPACE, IO_NODELOCKED, ap->a_cnp->cn_cred, NULL,
(struct proc *)0);
bad:
- if (error)
- vput(vp);
+ vput(vp);
return (error);
}