summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConstantine Sapuntzakis <csapuntz@cvs.openbsd.org>1997-11-07 23:01:38 +0000
committerConstantine Sapuntzakis <csapuntz@cvs.openbsd.org>1997-11-07 23:01:38 +0000
commit76fd4e6754ea959eab47e27fa8e2c02ecec41374 (patch)
tree3ddb291bc5a8c6bc7b8df463de55ca9996169e64
parentadd029684c5d9b027c6c9a3ba862b14909708ab8 (diff)
Fixed hang on shutdown
Disabled vop_nolock for now. Filesystems still need to be cleaned up.
-rw-r--r--sys/kern/vfs_bio.c12
-rw-r--r--sys/kern/vfs_subr.c12
2 files changed, 16 insertions, 8 deletions
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c
index d97a3b305c5..e094901f075 100644
--- a/sys/kern/vfs_bio.c
+++ b/sys/kern/vfs_bio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_bio.c,v 1.18 1997/11/06 05:58:25 csapuntz Exp $ */
+/* $OpenBSD: vfs_bio.c,v 1.19 1997/11/07 23:01:36 csapuntz Exp $ */
/* $NetBSD: vfs_bio.c,v 1.44 1996/06/11 11:15:36 pk Exp $ */
/*-
@@ -850,15 +850,13 @@ biodone(bp)
if (LIST_FIRST(&bp->b_dep) != NULL && bioops.io_complete)
(*bioops.io_complete)(bp);
- if (ISSET(bp->b_flags, B_CALL)) { /* if necessary, call out */
- CLR(bp->b_flags, B_CALL); /* but note callout done */
- (*bp->b_iodone)(bp);
- }
-
if (!ISSET(bp->b_flags, B_READ)) /* wake up reader */
vwakeup(bp);
- if (ISSET(bp->b_flags, B_ASYNC)) /* if async, release it */
+ if (ISSET(bp->b_flags, B_CALL)) { /* if necessary, call out */
+ CLR(bp->b_flags, B_CALL); /* but note callout done */
+ (*bp->b_iodone)(bp);
+ } else if (ISSET(bp->b_flags, B_ASYNC)) /* if async, release it */
brelse(bp);
else { /* or just wakeup the buffer */
CLR(bp->b_flags, B_WANTED);
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
index 120b33a76e7..e9a25ec02d7 100644
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_subr.c,v 1.14 1997/11/06 22:46:19 csapuntz Exp $ */
+/* $OpenBSD: vfs_subr.c,v 1.15 1997/11/07 23:01:37 csapuntz Exp $ */
/* $NetBSD: vfs_subr.c,v 1.53 1996/04/22 01:39:13 christos Exp $ */
/*
@@ -1063,6 +1063,7 @@ vop_nolock(v)
struct proc *a_p;
} */ *ap = v;
+#ifdef notyet
/*
* This code cannot be used until all the non-locking filesystems
* (notably NFS) are converted to properly lock and release nodes.
@@ -1106,6 +1107,15 @@ vop_nolock(v)
if (flags & LK_INTERLOCK)
vnflags |= LK_INTERLOCK;
return(lockmgr(vp->v_vnlock, vnflags, &vp->v_interlock, ap->a_p));
+#else /* for now */
+ /*
+ * Since we are not using the lock manager, we must clear
+ * the interlock here.
+ */
+ if (ap->a_flags & LK_INTERLOCK)
+ simple_unlock(&ap->a_vp->v_interlock);
+ return (0);
+#endif
}
/*