From 6acceb40dc0e64f0d6ea879fff2339398f078b1c Mon Sep 17 00:00:00 2001 From: Bruce Evans Date: Tue, 27 Jun 1995 21:29:08 +0000 Subject: [PATCH] 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. --- sys/kern/vfs_export.c | 5 +++-- sys/kern/vfs_subr.c | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/sys/kern/vfs_export.c b/sys/kern/vfs_export.c index 710b3cb9dd7a..53ba56dc5bb8 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 #include +#include #include #include #include @@ -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 710b3cb9dd7a..53ba56dc5bb8 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 #include +#include #include #include #include @@ -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); } /*