summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1995-06-27 21:29:08 +0000
committerbde <bde@FreeBSD.org>1995-06-27 21:29:08 +0000
commitf29b23726307342dbbf0eb089f776c57217c1a09 (patch)
tree3565d73f90ed571bcd0f84aff5e4c11f158771a7
parent132de1262ba36ab2884665bf9bf35214fff8eb25 (diff)
downloadFreeBSD-src-f29b23726307342dbbf0eb089f776c57217c1a09.zip
FreeBSD-src-f29b23726307342dbbf0eb089f776c57217c1a09.tar.gz
Pass the correct nonblocking flag to VOP_CLOSE() in vclean().
VOP_CLOSE() takes `F' (file) flags, not `IO' flags. At least that's what close() passes. I previously fixed ttylclose() to check FNONBLOCK instead of IO_NDELAY. This broke the call from vclean() and cleaning of ptys sometimes deadlocked.
-rw-r--r--sys/kern/vfs_export.c5
-rw-r--r--sys/kern/vfs_subr.c5
2 files changed, 6 insertions, 4 deletions
diff --git a/sys/kern/vfs_export.c b/sys/kern/vfs_export.c
index 710b3cb..53ba56d 100644
--- a/sys/kern/vfs_export.c
+++ b/sys/kern/vfs_export.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)vfs_subr.c 8.13 (Berkeley) 4/18/94
- * $Id: vfs_subr.c,v 1.29 1995/05/12 04:24:53 davidg Exp $
+ * $Id: vfs_subr.c,v 1.30 1995/05/21 21:38:51 davidg Exp $
*/
/*
@@ -45,6 +45,7 @@
#include <sys/param.h>
#include <sys/systm.h>
+#include <sys/file.h>
#include <sys/proc.h>
#include <sys/mount.h>
#include <sys/time.h>
@@ -998,7 +999,7 @@ vclean(vp, flags)
*/
if (active) {
if (flags & DOCLOSE)
- VOP_CLOSE(vp, IO_NDELAY, NOCRED, NULL);
+ VOP_CLOSE(vp, FNONBLOCK, NOCRED, NULL);
VOP_INACTIVE(vp);
}
/*
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
index 710b3cb..53ba56d 100644
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)vfs_subr.c 8.13 (Berkeley) 4/18/94
- * $Id: vfs_subr.c,v 1.29 1995/05/12 04:24:53 davidg Exp $
+ * $Id: vfs_subr.c,v 1.30 1995/05/21 21:38:51 davidg Exp $
*/
/*
@@ -45,6 +45,7 @@
#include <sys/param.h>
#include <sys/systm.h>
+#include <sys/file.h>
#include <sys/proc.h>
#include <sys/mount.h>
#include <sys/time.h>
@@ -998,7 +999,7 @@ vclean(vp, flags)
*/
if (active) {
if (flags & DOCLOSE)
- VOP_CLOSE(vp, IO_NDELAY, NOCRED, NULL);
+ VOP_CLOSE(vp, FNONBLOCK, NOCRED, NULL);
VOP_INACTIVE(vp);
}
/*
OpenPOWER on IntegriCloud