summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorConstantine Sapuntzakis <csapuntz@cvs.openbsd.org>1997-11-06 22:52:47 +0000
committerConstantine Sapuntzakis <csapuntz@cvs.openbsd.org>1997-11-06 22:52:47 +0000
commit460cc6faea4415d400bf8f1116131b11d1682c88 (patch)
treeb62aeef006d1f26730cb19f63f71dfa0bd53fa63 /sys
parent28ad34a5066792793751e691e5f730e5c6e46d06 (diff)
Fixed minor bug in msdosfs_hashget
Diffstat (limited to 'sys')
-rw-r--r--sys/msdosfs/msdosfs_denode.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/msdosfs/msdosfs_denode.c b/sys/msdosfs/msdosfs_denode.c
index 16214003faf..79bc3119b96 100644
--- a/sys/msdosfs/msdosfs_denode.c
+++ b/sys/msdosfs/msdosfs_denode.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: msdosfs_denode.c,v 1.8 1997/11/06 05:58:56 csapuntz Exp $ */
+/* $OpenBSD: msdosfs_denode.c,v 1.9 1997/11/06 22:52:46 csapuntz Exp $ */
/* $NetBSD: msdosfs_denode.c,v 1.22 1996/10/13 04:16:31 christos Exp $ */
/*-
@@ -93,7 +93,7 @@ msdosfs_hashget(dev, dirclust, diroff)
{
struct denode *dep;
struct proc *p = curproc; /* XXX */
-
+
for (;;)
for (dep = dehashtbl[DEHASH(dev, dirclust, diroff)];;
dep = dep->de_next) {
@@ -103,8 +103,10 @@ msdosfs_hashget(dev, dirclust, diroff)
diroff == dep->de_diroffset &&
dev == dep->de_dev &&
dep->de_refcnt != 0) {
+ struct vnode *vp = DETOV(dep);
+
simple_lock(&vp->v_interlock);
- if (!vget(DETOV(dep), LK_EXCLUSIVE | LK_INTERLOCK, p))
+ if (!vget(vp, LK_EXCLUSIVE | LK_INTERLOCK, p))
return (dep);
break;
}